Processing devices with improved addressing capabilities systems and methods

ABSTRACT

A data processing device comprising a storage circuit accessible by assertion of addresses, an arithmetic logic unit connected to the storage circuit operative to perform an arithmetic operation on data received by the arithmetic unit. Further included is an address register for storing an initial address word indicative of a storage circuit address. An instruction decode and control unit, connected to the storage circuit and having an instruction register operative to hold a program instruction is operative to decode the program instruction into control signals to control the operations of the data processing device and location codes to control data transfers according to predetermined sections of the program instruction wherein at least one of the sections includes a location section selecting the address register and a displacement section containing address data. Further included is an address generating unit connected to the storage circuit, the instruction register, and the address register responsive to the control signals from the instruction decode and control unit combining the initial address word from the address register and the address data from the displacement section to generate a storage circuit address. Other devices, systems and methods are also disclosed.

This application is a divisional of prior application Ser. No.09/071,718, filed May 1, 1998, U.S. Pat. No. 6,411,984 which is adivisional of prior application Ser. No. 08/420,458 filed Apr. 10, 1995,U.S. Pat. No. 5,751,991 issued May 12, 1998, which is a continuation ofprior application Ser. No. 08/170,609 filed Dec. 21, 1993, nowabandoned, which is a divisional of prior application Ser. No.07/589,968 filed Sep. 28, 1990, U.S. Pat. No. 5,305,446 issued May 19,1994.

NOTICE

(C) Copyright 1989 Texas Instruments Incoporated. A portion of thedisclosure of this patent document contains material which is subject tocopyright protection. The copyright owner has no objection to thefacsimile reproduction by anyone of the patent disclosure, as it appearsin the Patent and Trademark Office patent file or records, but otherwisereserves all copyright rights whatsoever.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to coassigned applications Ser. No.08/265,977 filed Jun. 27, 1994 now U.S. Pat. No. 5,410,652 Ser. No.08/326,677 filed Oct. 20, 1999, now U.S. Pat. No. 5,594,914, Ser. No.07/590,372 filed Sep. 28, 1990, now U.S. Pat. No. 5,390,304 and Ser. No.08/420,932 filed Apr. 12, 1995 now U.S. Pat. No. 5,535,348 incorporatedherein by reference. In addition, the applicants hereby incorporate byreference the following co-assigned patent documents.

a) U.S. Pat. No. 4,713,748

b) U.S. Pat. No. 4,577,282

c) U.S. Pat. No. 4,912,636

d) U.S. Pat. No. 4,878,190

e) U.S. application Ser. No. 347,967 filed May 4, 1989

f) U.S. application Ser. No. 388,270 filed Jul. 31, 1989

g) U.S. application Ser. No. 421,500 filed Oct. 13, 1989

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention generally relates to data processing devices, systems andmethods and more particularly to communication between such devices,systems and methods.

2. Background Art

A microprocessor device is a central processing unit or CPU for adigital processor which is usually contained in a single semiconductorintegrated circuit or “chip” fabricated by MOS/LSI technology, as shownin U.S. Pat. No. 3,757,306 issued to Gary W. Boone and assigned to TexasInstruments Incorporated. The Boone patent shows a single-chip 8-bit CPUincluding a parallel ALU, registers for data and addresses, aninstruction register and a control decoder, all interconnected using thevon Neumann architecture and employing a bidirectional parallel bus fordata, address and instructions. U.S. Pat. No. 4,074,351, issued to GaryW. Boone, and Michael J. Cochran, assigned to Texas InstrumentsIncorporated, shows a single-chip “microcomputer” type device whichcontains a 4-bit parallel ALU and its control circuitry, with on-chipROM for program storage and on-chip RAM for data storage, constructed inthe Harvard architecture. The term microprocessor usually refers to adevice employing external memory for program and data storage, while theterm microcomputer refers to a device with on-chip ROM and RAM forprogram and data storage. In describing the instant invention, the term“microcomputer” will be used to include both types of devices, and theterm “microprocessor” will be primarily used to refer to microcomputerswithout on-chip ROM; both terms shall be used since the terms are oftenused interchangeably in the art.

Modern microcomputers can be grouped into two general classes, namelygeneral-purpose microprocessors and special-purpose microcomputers andmicroprocessors. General purpose microprocessors, such as the M68020manufactured by Motorola, Inc., are designed to be programmable by theuser to perform any of a wide range of tasks, and are therefore oftenused as the central processing unit in equipment such as personalcomputers. Such general-purpose microprocessors, while having goodperformance for a wide range of arithmetic and logical functions, are ofcourse not specifically designed for or adapted to any particular one ofsuch functions. In contrast, special-purpose microcomputers are designedto provide performance improvement for specific predetermined arithmeticand logical functions for which the user intends to use themicrocomputer. By knowing the primary function of the microcomputer, thedesigner can structure the microcomputer in such a manner that theperformance of the specific function by the special-purposemicrocomputer greatly exceeds the performance of the same function bythe general-purpose microprocessor regardless of the program created bythe user.

One such function which can be performed by a special-purposemicrocomputer at a greatly improved rate is digital signal processing,specifically the computations required for the implementation of digitalfilters and for performing Fast Fourier Transforms. Because suchcomputations consist to a large degree of repetitive operations such asinteger multiply, multiple-bit shift, and multiply-and-add, aspecial-purpose microcomputer can be constructed specifically adapted tothese repetitive functions. Such a special-purpose microcomputer isdescribed in U.S. Pat. No. 4,577,282, assigned to Texas InstrumentsIncorporated. The specific design of a microcomputer for thesecomputations has resulted in sufficient performance improvement overgeneral purpose microprocessors to allow the use of such special-purposemicrocomputers in real-time applications, such as speech and imageprocessing.

The increasing demands of technology and the marketplace make desirableeven further structural and process improvements in processing devices,systems and methods of operation. These demands have lead to increasingthe performance of single-chip devices and single systems asstate-of-the-art silicon processing technologies allow. However, someperformance-hungry applications such as video conferencing, 3D graphicsand neural networks require performance levels over and above that whichcan be achieved with a single device or system. Many such applicationsbenefit from parallel processing.

However, performance gains from parallel processing are improved whencommunication overhead between processors is minimized. Thus,improvements are desirable which enhance interprocessor communications,and thus software and system development.

SUMMARY OF THE INVENTION

In general, the summary of the invention is a data processing devicecomprising a storage circuit accessible by assertion of addresses, anarithmetic logic unit connected to the storage circuit, operative toperform an arithmetic operation on data received by the arithmetic unit.Further included is an address register for storing an initial addressword indicative of a storage circuit address. An instruction decode andcontrol unit, connected to the storage circuit and having an instructionregister operative to hold a program instruction is operative to decodethe program instruction into control signals to control the operationsof the data processing device and location codes to control datatransfers according to predetermined sections of the program instructionwherein at least one of the sections includes a location sectionselecting the address register and a displacement section containingaddress data. Further included is an address generating unit connectedto the storage circuit, the instruction register, and the addressregister responsive to the control signals from the instruction decodeand control unit combining the initial address word from the addressregister and the address data from the displacement section to generatea storage circuit address.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. The preferred embodiments of the inventionas well as other features and advantages thereof will be best understoodby reference to the detailed description which follows, read inconjunction with the accompanying drawings, wherein:

FIG. 1 is an electrical diagram, in block form, of a microcomputerconstructed according to the invention.

FIG. 1a is a block diagram illustrating control registers of the CPU ofthe microcomputer of FIG. 1.

FIG. 2a is an electrical diagram, in block form, of the communicationport of the microcomputer of FIG. 1 interfaced to an analog to digitalconverter.

FIG. 2b is an electrical diagram, in block form, of the communicationport of the microcomputer of FIG. 1 interfaced to a data processingdevice via an interface module.

FIG. 3 is a diagram illustrating four instruction formats of themicrocomputer of FIG. 1.

FIG. 4 is an electrical diagram, in block form, of the data flow whichoccurs when invoking the four instruction formats illustrated in FIG. 3.

FIG. 5a is an electrical diagram, in block form, of the peripheral portsof the microcomputer of FIG. 1.

FIG. 5b is a electrical diagram, in block form, illustrating interfacesignals of the global peripheral port of the microcomputer of FIG. 1.

FIG. 5c is a electrical diagram, in block form, illustrating interfacesignals of the local peripheral port of the microcomputer of FIG. 1.

FIG. 5d is a block diagram illustrating the relationship between thebits of an address defining the current page and the bits of an addressdefining the addresses on a current page.

FIG. 5e is a block diagram illustrating the global peripheral interfacecontrol register of the microcomputer of FIG. 1.

FIG. 5f is a block diagram illustrating the global peripheral interfacecontrol register of the microcomputer of FIG. 1.

FIG. 5g is a block diagram illustrating the effect of the STRB ACTIVEfield on the memory map of the global memory bus of the microcomputer ofFIG. 1.

FIG. 6a is a timing diagram illustrating when signal RDY_ is sampled inrelation to the STRB_ and H1 signals of the global peripheral port ofthe microcomputer of FIG. 1.

FIG. 6b is a timing diagram illustrating a read, read and write sequenceto the same page of an external memory map via the global peripheralport of the microcomputer of FIG. 1.

FIG. 6c is a timing diagram illustrating a write, write and readsequence to the same page of an external memory map via the globalperipheral port of the microcomputer of FIG. 1.

FIG. 6d is a timing diagram illustrating a read same page, readdifferent page and a read same page sequence to an external memory mapvia the global peripheral port of the microcomputer of FIG. 1.

FIG. 6e is a timing diagram illustrating a write same page, writedifferent page and a write same page sequence to an external memory mapvia the global peripheral port of the microcomputer of FIG. 1.

FIG. 6f is a timing diagram illustrating a write same page, readdifferent page and a write different page sequence to an external memorymap via the global peripheral port of the microcomputer of FIG. 1.

FIG. 6g is a timing diagram illustrating a read different page, readdifferent page and a write same page sequence to an external memory mapvia the global peripheral port of the microcomputer of FIG. 1.

FIG. 6h is a timing diagram illustrating a write different page, writedifferent page and a read same page sequence to an external memory mapvia the global peripheral port of the microcomputer of FIG. 1.

FIG. 6i is a timing diagram illustrating a read same page, writedifferent page and a read different page sequence to an external memorymap via the global peripheral port of the microcomputer of FIG. 1.

FIG. 7a is an electrical diagram, in block form, of the controller ofthe microcomputer of FIG. 1.

FIG. 7b is a timing diagram illustrating the pipelining of instructioncodes performed by the controller of FIG. 6a.

FIG. 8a is a chart illustrating the properties of a delayed branchinstruction, trap instruction and a delayed branch instruction.

FIG. 8b is a diagram illustrating the initiation of the delayed trapinstruction in relation to the intervals of the pipeline of themicrocomputer of FIG. 1.

FIG. 8c is a diagram illustrating a trap vector table of themicrocomputer of FIG. 1.

FIG. 8d is a flow chart illustrating the execution of a delayed trapinstruction of the microcomputer of FIG. 1.

FIG. 8e is a diagram illustrating the initiation of the repeat blockdelayed instruction in relation to the intervals of the pipeline of themicrocomputer of FIG. 1.

FIG. 8f is a electrical diagram, in block form, of the repeat blocklogic contained in the CPU of the microcomputer of FIG. 1.

FIG. 8g is a flow chart illustrating the execution of a repeat blockdelayed instruction of the microcomputer of FIG. 1.

FIG. 9 is an electrical diagram, in block form, of the instruction cacheof the microcomputer of FIG. 1.

FIG. 10 is an electrical diagram, in block form, of the DMA coprocessorof the microcomputer of FIG. 1.

FIG. 11 is a block diagram of the split-mode DMA operation of themicrocomputer of FIG. 1.

FIG. 12a is a diagram illustrating the rotating priority schemeimplemented for the six DMA channels of the microcomputer of FIG. 1.

FIG. 12b is a diagram illustrating the rotating priority schemeimplemented for split-mode DMA operation of the microcomputer of FIG. 1.

FIG. 13 is an electrical diagram, in block form, of the peripheralmodules and peripheral bus of the microcomputer of FIG. 1.

FIG. 14 is an electrical diagram, in block form, of two communicationports directly interfaced.

FIG. 15 is an electrical diagram, in block form, of the communicationport of the microcomputer of FIG. 1.

FIG. 16 is a state diagram, in block form, of the communication portarbitration unit of the microcomputer of FIG. 1.

FIG. 17 illustrates the signal convention used between two connectedcommunication ports A and B.

FIG. 18a is a timing diagram illustrating a token transfer betweencommunication ports A and B.

FIG. 18b is a timing diagram illustrating data transfer betweencommunication ports A and B.

FIG. 19 illustrates a stand-alone configuration of the improved dataprocessing device of FIG. 1 configured to show connection to a pluralityof memory and peripheral devices, as well as connection to other systemsvia communication ports.

FIG. 20 illustrates a parallel processing system architecture withexternal memory in the form of building blocks.

FIG. 21 illustrates a single data processing device without externalmemory in the form of building blocks.

FIG. 22 illustrates another parallel processing system architecture in apipelined linear array or systolic array.

FIG. 23 illustrates another parallel processing system architecture inthe form of a bidirectional ring.

FIG. 24 illustrates another parallel processing system architecture inthe form of a tree.

FIG. 25 illustrates another parallel processing system architecturewherein the communication ports are used to support a variety oftwo-dimensional structures such as a lattice.

FIG. 26 illustrates another parallel processing system architecturewherein a two-dimensional structure, in the form of a hexagonal mesh, isconstructed.

FIG. 27 illustrates another parallel processing system architectureusing a three-dimensional grid or cubic lattice.

FIG. 28 illustrates another parallel processing system architecturewhere a four-dimensional hypercube structure is utilized.

FIG. 29 illustrates another parallel processing system architecturewhich illustrates a combination of shared memory andprocessor-to-processor communication.

FIG. 30 illustrates yet another configuration of parallel processingsystem architecture wherein communication ports and support for sharedglobal memory permit a variety of configurations.

FIG. 31 illustrates another parallel processing system architecturewherein a plurality of improved data processing devices of FIG. 1interface to global and local memory.

FIG. 32 illustrates yet another configuration of parallel processingsystem architecture where a plurality of data processing devices of FIG.1 share a plurality of global memories.

FIG. 33 illustrates another configuration of parallel processing systemarchitecture where communication between some processors are establishedvia modems.

FIG. 34 illustrates a example robotic structure that utilizes theparallel processing system architecture.

FIG. 35 illustrates a circuit used to multiplex data for thethree-operand addressing instructions.

FIG. 36a illustrates a circuit which counts the three instructionsfetched after a delayed trap instruction.

FIG. 36b illustrates an incrementer used in the implementation of thedelayed trap instructions.

Corresponding numerals and other symbols refer to corresponding parts inthe various figures of drawings except where the context indicatesotherwise.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring now to FIG. 1, the architecture of a microcomputer 10 isshown, said microcomputer being specially adapted to digital signalprocessing and incorporating the instant invention. The major functionalblocks of microcomputer 10 are constituted by central processing unit(CPU) 12, controller 14, and direct memory access (DMA) coprocessor 22.The memory contained in microcomputer 10 according to this embodiment ofthe invention includes random access memories (RAMs) 16 and 18, andread-only memory (ROM) 20. RAMs 16 and 18 contain, in this embodiment,2¹⁰, or 1K, words; ROM 20 contains 2¹², or 4K, words. Externalconnection is made by way of peripheral ports 24 and 26, which multiplexvarious bus signals onto external terminals of microcomputer 10 andwhich provide special purpose signals for communication to externaldevices which are to receive and send data via such external terminals.Connected to peripheral port 25 is peripheral bus 28, which is adaptedto be connected to various peripheral function blocks as will beexplained hereinbelow.

Data communication within microcomputer 10 can be effected by way ofdata bus 30. Data bus 30 contains a set of data lines 30 d which arededicated to the communication of data signals among memories 16, 18 and20, peripheral ports 24, 25 and 26, and CPU 12. In this embodiment ofthe invention, data bus 30 contains thirty-two data lines in set 30 d;accordingly, the data signals communicated among memories 16, 18 and 20,peripheral ports 24, 25 and 26, and CPU 12 are considered as thirty-twobit words. Data bus 30 further contains a first set of address lines 30a and a second set of address lines 30 b, both of which are forcommunication of address signals corresponding to memory locations inmemories 16, 18 and 20. In this embodiment of the invention, data bus 30contains thirty-two address lines in each of sets 30 a and 30 b. Addresslines 30 a and 30 b are also connected among CPU 12, peripheral ports24, 25 and 26, and memories 16, 18 and 20. As is evident from FIG. 1,memories 16, 18 and 20 each have two ports 32 a and 32 d. Each of ports32 a are connected to address lines 30 a and 30 b of data bus 30, andreceive the address signals presented thereupon to provide access to thecorresponding memory location by way of port 32 d to data lines 30 d ofdata bus 30.

Microcomputer 10 also effects communication by way of program bus 34.Similarly as data bus 30, program bus 34 contains a set of data lines 34d connected to ports 32 d of memories 16, 18 and 20. Data lines 34 d ofprogram bus are also connected to peripheral ports 24, 25 and 26, and tocontroller 14. Program bus 34 further contains a set of address lines 34a, which are connected to ports 32 a of memories 16, 18 and 20, toperipheral ports 24, 25 and 26, and to controller 14. Also connected toaddress bus 34 is instruction cache 36 which also has ports 32 a and 32d connected to address lines 34 a and data lines 34 d, respectively.Instruction cache 36 is a small (128 word) high speed memory which isused to retain the most recently used instruction codes so that, ifexternal memory devices are used for program storage, the retrieval ofrepetitively used instructions can be effected at the same rate as frommemories 16, 18 and 20. Detailed construction and operation ofinstruction cache 36 is given hereinbelow. Controller 14 contains suchcircuitry as required to decode instruction codes received on data lines34 d of program bus 34 into control signals which control the specificlogic circuitry contained in all blocks of microcomputer 10. FIG. 1illustrates lines SEL₁₆, SEL₁₈, SEL₂₀, SEL₂₄, SEL₂₅ and SEL₂₆ whichcarry certain of these control signals to control access ofmicrocomputer 10 to memories 16, 18, and 20, and peripheral ports 24, 25and 26, respectively. Control signals CNTL14 provide communicationcontrols between CPU 12 and communication ports 50 through 55; othersuch control signals generated by controller 14 are not shown in FIG. 1,for purposes of clarity. Because of its connection to instruction cache36 and to controller 14, program bus 34 is used primarily for theaddressing and communication of instruction codes contained in memories16, 18 and 20. According to the invention, such instruction codes canreside in any of memories 16, 18 and 20, or in external memory, withoutdesignation of any specific locations as dedicated to program memory.

DMA coprocessor 22 is connected to memories 16, 18 and 20 by way DMA bus38. Similarly as data bus 30 and program bus 34, DMA bus 38 has a set ofdata lines 38 d which are connected to ports 32 d of memories 16, 18 and20. DMA bus 38 further has a set of address lines 38 a connected toports 32 a of memories 16, 18 and 20. DMA coprocessor 22 is alsoconnected to peripheral bus 28, and to peripheral ports 24, 25 and 26.DMA coprocessor 22 effects direct memory access operations, by whichblocks of data stored within the memory space of microcomputer 10 may bemoved from one area of memory (the source) to another (destination). Thesource area of memory may be within memories 16, 18 or 20, or in memorydevices external to microcomputer 10 which are connected to theterminals served by peripheral port 24 and 26, and the destination ofthe block of data may be in all of such memories (except of course ROM20). It is apparent from the construction of microcomputer 10 as shownin FIG. 1, and from the descriptive name given (DMA coprocessor 22),that such DMA operations may be effected by DMA coprocessor 22 inmicrocomputer 10 without requiring the intervention of CPU 12.

At the conclusion of a block transfer, the DMA coprocessor 22 can beprogrammed to do several things: an interrupt can be generated to signalthat the block transfer is complete; the DMA channel can stop untilreprogrammed; or most importantly, the DMA channel can autoinitializeitself at the start of the next block transfer for effectuating anotherblock transfer by obtaining a new source and destination area spacewithin memories 16, 18 or 20 or in memory devices external tomicrocomputer 10 which are connected to the terminals served byperipheral port 24 and 26. This autoinitalization for effectuatinganother block transfer is done without any intervention by the CPU.

Six specialized communication ports 50 through 55 are served byperipheral port 25 and peripheral bus 28. Communication ports 50 through55 provide additional means for external data transfers. Control signalsDMA22 provide communication controls between DMA coprocessor 22 andcommunication ports 50-55. FIGS. 2a and 2 b illustrate the versatilityof the communication ports. In FIG. 2a, the communication port isconnected to a stream oriented device such as an analog to digital (A/D)converter. It should be noted that control and data signals 585 areproperly matched. Utilizing the input and output first-in-first-out(FIFO) buffers 540 and 550, the communication port provides a bufferedinterface for the stream oriented device. Other stream oriented devicesinclude a digital to analog (D/A) converter. FIG. 2b shows another dataprocessing device connected to the communication via interface 590. Itis apparent from the examples in FIGS. 2a and 2 b that interfacing tothe communication ports is readily accomplished through the use ofdevices with proper interface signals 585 built onto the device orthrough the use of an interfacing module 590 that is designed to provideproper interface signals 585 to existing devices not built toaccommodate the communication port.

Each one of the communication ports 50 through 55 provide abidirectional interface 580 with an eight word (thirty-two bits/word)deep input first-in-first-out (FIFO) buffer 540 and an eight word deepoutput FIFO buffer 550. Arbitration and handshaking circuitry 500 isself contained within each communication port for effectuating externalcommunications via control and data lines 585. A detailed description ofthe communication ports 50 through 55 is discussed below. It should benoted that the preferred embodiment of microcomputer 10 has a specialsplit-mode operation that utilizes the DMA coprocessor 22 andcommunication ports 50 through 55. In split-mode one DMA channel istransformed into two channels: one DMA channel is dedicated to receivingdata from a communication port (the source) and writing it to a locationin the memory map (destination); and one DMA channel is dedicated toreading data from a location in the memory map (the source) and writingit to a communication port (destination). Details of the split-mode DMAwill be further described below.

There are six DMA channels in the preferred embodiment; each of them arecapable of performing all of the functions described hereinabove. Sinceall six DMA channels use the same DMA bus 38 and peripheral bus 28 toeffectuate its block transfers, conflicts for DMA accesses might occurbetween the channels. Thus, the DMA coprocessor 22 also functions toarbitrate requests from any or all of the six DMA channels requestingaccess to the DMA bus 38 and peripheral bus 28. The DMA coprocessor 22implements a rotating priority scheme to insure that any channelrequesting bus access will in turn be serviced. Details of the rotatingpriority scheme will be further described below.

Ports 32 a are primarily multiplexers, so that selection of one set ofaddress lines 30 a, 30 b, 34 a, or 38 a for connection to its associatedmemory 16, 18 or 20 can be effected. Similarly, each of ports. 32 d areconnected to data lines 30 d of data bus 30, for communication of thedata stored (or to be stored) by the addressed memory location. Memories16, 18 and 20 each contain an address decoder 33, connected to its port32 a, for decoding the memory address signal presented on the selectedone of said address lines 30 a, 30 b, 34 a, or 38 a. Based on the outputfrom address decoder 33, access is granted to the memory locationspecified by the selected address signal. RAMs 16 and 18, and ROM 20,are all constructed so that the selected memory location is sensedand/or written based upon the output of address decoder 33 therewithin.Ports 32 d provide a high-impedance output to the data lines of buses30, 34 and 38 connected thereto when not selected, thereby preventingdata conflicts on buses 30, 34 and 38.

Each of the sets of address lines in data bus 30, program bus 34 and DMAbus 38 consist of thirty-two conductors in the preferred embodiment ofthis invention. Accordingly, the maximum number of memory locationsaddressable by way of the sets of address lines in data bus 30, programbus 34 and DMA bus 38 is 2³² words (four Giga-words) of thirty-two bits.However, since the total number of words in memories 16, 18 and 20 is6K, a large amount of the addressable memory space of microcomputer 10may reside in memory devices external to microcomputer 10. Such externalmemory has address decoding capability, similar to the on-chip memories16, 18 and 20, and responds to the generated address signals on theaddress lines of buses 30, 34 and 38 in a similar fashion. In thepreferred embodiment, a single memory address space is provided formicrocomputer 10, so that a given address signal presented on any givenset of address lines of buses 30, 34 and 38 will address a memorylocation in only one of memories 16, 18 and 20. Therefore, using theexample of address lines 30 a being selected by ports 32 a, a givenaddress signal on address lines 30 a will correspond to a memorylocation in only one of memories 16, 18 and 20, or in external data,program or input/output memory. It should be noted that microcomputer 10is organized in such a fashion that it is preferable that external dataand program memory be accessed by way of peripheral port 24 and 26, andthat internal input/output memory be accessed by way of peripheral port25.

Peripheral bus 28 is connected between peripheral port 25 and variousperipheral functions. Peripheral bus is therefore selectivelyconnectable to any one of buses 30, 34 and 38, depending upon thecontrol of peripheral port 25 by controller 14. In this manner,peripheral bus 28 appears to the remainder of microcomputer 10 as anoff-chip bus. This provides for such functions as normally provided byperipheral devices to be incorporated into microcomputer 10;communications with such peripheral devices are performed by theremainder of microcomputer 10 in much the same way as an off-chipdevice. By way of example, microcomputer 10 of FIG. 1 has timer 40 and41, analysis module 42 and six communication ports 50-55 attached toperipheral bus 28. Similarly as the other buses described above,peripheral bus 28 contains data lines 28 d and address lines 28 a. Incontrast to the communication between memories 16, 18 and 20 and theremainder of microcomputer 10 connected to buses 30, 34 and 38, however,address lines 28 a of peripheral bus 28 are used to select one of saidperipherals 40, 41, 42 or communication ports 50-55 connected thereto toreceive or transmit data from or to data lines 28 d of peripheral bus28. In addition, as will be described below, control registers in DMAcoprocessor 22 and in communication ports 50-55 are also accessed by wayof peripheral bus 28.

The construction and operation of a CPU and its addressing modes similarto CPU 12 is described in the incorporated U.S. Pat. No. 4,912,636.However, CPU 12 is modified to embody a larger multiplier capable ofhandling thirty-two bits by thirty-two bits integer multiplies and fortybits by forty bits floating point multiplies. CPU 12 incorporates areciprocal seed ROM used to compute an approximation to 1/B where B isthe divisor. A reciprocal square root seed ROM is also present forgenerating a seed approximating the reciprocal of the square root of theoperand for square root calculations. The advantages and details aboutthe operation of the seed ROM is described in U.S. Pat. No. 4,878,190assigned to Texas Instruments Incorporated which is incorporated hereinby reference.

FIG. 1a shows a number of control registers 160 of the preferredembodiment of CPU 12. Interrupt and trap vector table pointers 161 areeach 32-bit registers. These registers reside in a CPU 12 expansionregister-file located away from CPU 12 unlike other control registersfor CPU 12 that reside within CPU 12. Since interrupt and trap vectortable pointers 161 are control registers of CPU 12, CPU 12 accesses theregisters at various times. Thus, instructions are available to performa load from an expansion register to a primary register for use by CPU12. Conversely, a command is available to perform a load from a primaryregister to an expansion register when the primary register is loadedwith control data from another control register within CPU 12.

The interrupt vector table pointer (IVTP) points to the interrupt vectortable (IVT) which contains addresses of the first instruction ofinterrupt routines.

The trap vector table pointer (TVTP) points to the trap vector table(TVT) which contains addresses of the first instruction of traproutines.

Interrupt and trap routines are instructions that are executed duringthe execution of the main program to accommodate situations confrontedby microcomputer 10 of the preferred embodiment.

The CPU and DMA interrupt mask and flags 162 are 32-bit registers. Themask registers are used to enable or disable interrupts while the flagregisters are set by devices indicating a condition has occurred.

The stack pointer (SP) 163 is a 32-bit register that contains theaddress of the top of the system stack. The SP points to the lastelement pushed onto the stack.

Block repeat register 164 are 32-bit registers containing the startingand ending address of the block of program memory to be repeated whenoperating in the repeat mode.

The status register 165 is a 32-bit register containing globalinformation relating to the state of CPU 12.

Index register 166 are 32-bit registers used by the auxiliary registerarithmetic units for indexing addresses. The incorporated U.S. Pat. No.4,912,636 describes the operations of indexing addresses.

The preferred embodiment has improved three-operand addressinginstructions. The three-operand addressing not only includes two datafetches for operands and one data load for the result into a registerfile but further features also. The data fetches selectively supportedby the preferred embodiment are: immediate data from the instruction,memory data located at a displacement of an auxiliary register, and aregister in the register file. The four instruction formats are shown inFIG. 3. The description herein below mainly discusses the improvement ofthe instruction formats thus concentrating on the scr1 and scr2 field.The two scr1 and scr2 fields determine the operands for ALU 130 shown inFIG. 4. Rn field 120 of the instruction is a five bit field used toaddress a register in register file 131 as shown in FIG. 4. Immediatefield 121 of the instruction is immediate data residing in theinstruction word that is decoded and extracted by instruction decode andcontrol 202. ARn 122 and ARm 123 correspond with dispn 124 and dispm 125of the instruction respectively to effectuate indirect addressing asdescribed in the incorporated U.S. Pat. No. 4,912,636. AR file 132 andauxiliary ALU 133 and 134 are used to effectuate the indirect addressesfor the data operands residing in memory 135.

Referring to FIG. 4, the instruction register 94 containing theinstruction word is decoded by instruction decode and control 202 whereappropriate control and data signals are generated. For example, the ARnfield 122 and ARm field 123 are decoded, and signals ARn_select andARm_select are generated to select address data from address register(AR) file 132. The fields dispn 124 and dispm 125 are decoded andextracted from the instruction word and sent to auxiliary ALU 133 and134 where the address data from AR file 132 are combined. Addressescorresponding to locations in memory 135 are generated and operands arefetched and fed to ALU 130. The immediate field 121 is decoded andextracted from the instruction word and becomes an operand to ALU 130.The Rn field 120 is decoded by instruction decode and control 202 andsignal Rn_select is generated to select the contents of Rn from registerfile 131. The dst field 126 is decoded by instruction decode and control202 and signal dst_select is generated to select the destinationregister to store the result of the operation from ALU 130 to registerfile 131. The operation field is decoded and extracted by theinstruction decode and control 202 to control the operation of ALU 130.Since fields 128 and 129 are not pertinent to the understanding of theimproved three-operand instruction and for purposes of clarity, they arenot discussed.

The four additional three-operand instruction formats shown in FIG. 3are developed to support the most common form of data addressingrequired for compiled code. As a result these instructions reduce codesize for both hand assembled and compiled code. Thus, noticeableimprovements in performance is realized in the speed and efficiency atwhich microcomputer 10 can perform its programmed tasks.

Referring now to FIG. 5a, the construction of peripheral ports 24, 25and 26 is described in detail. Peripheral ports 24, 25 and 26 areconnected to data bus 30, program bus 34 and DMA bus 38, as describedwith reference to FIG. 1. Peripheral port 24 consists primarily of amultiplexer 100, which selectively connects external data lines GD_(n)to data lines 30 d of data bus 30, data lines 34 d of program bus 34 ordata lines 38 d of DMA bus 38, responsive to control signals generatedon lines SEL₂₄ by controller 14. It should be noted that multiplexer 100creates a bidirectional connection between external data lines GD_(n)and the data lines 30 d, 34 d or 38 d, so that data may be received orpresented therebetween. In addition, multiplexer 102 selectivelyconnects external address lines GA_(n) to address lines 30 a or 30 b ofdata bus 30, address lines 34 a of program bus 34, or address lines 38 aof DMA bus 38, also responsive to controller 14 depending upon whichdata lines are connected by multiplexer 100 to data lines GD_(n).

Peripheral port 26 is similarly constructed as peripheral port 24, butis controlled by lines SEL₂₆ independently from peripheral port 24, sothat communication at peripheral ports 24, 25 and 26 can occursimultaneously and independently, so long as the buses 30, 34 and 38used by the ports are not simultaneously used. Peripheral port 26 is anadditional peripheral port having the same capabilities as peripheralport 24. Accordingly, as shown in FIG. 5a, peripheral port 26 containsmultiplexers 108 and 110 corresponding to like components in peripheralport 24.

Control and operation of the two external peripheral interfaces of thepreferred embodiment—global peripheral port 24 (or global memoryinterface) and local peripheral port 26 (or local memory interface)—arediscussed in detail. For purposes of this discussion the two ports arefunctionally identical, thus discussion of global peripheral port 24also applies to local peripheral port 26. FIG. 5b shows the interfacesignals for global peripheral port 24, and FIG. 5c shows the interfacesignals for local peripheral port 26.

Global peripheral port 24 has separate 32-bit data and 32-bit addressbuses. Two sets of control signals are available for interfacing withmultiple devices. Multiple sets of control signals are advantageousparticularly if interfacing devices operate at access times slower thanperipheral port 24. Thus, time spent waiting (idle time) for an externaldevice to respond is used to access another external device and the datathroughput of global peripheral port 24 is maximized.

Control signals STRB1_ and STRB2_ are shown in FIG. 5b. It should benoted that signal names shown in Figures with over bars above the signalname represent the corresponding signal name having a suffix “_” in thetext. STRB1_ and STRB2_ become active signalling the interval when validinformation and control signals can be passed between peripheral port 24and the connected external device. R/W0_ and R/W1_ specify the directionof the flow of data through peripheral port 24. Control signals RDY0_and RDY1_ are used to signal valid data is available on the selectedbus. Control signals PAGE0 and PAGE1 signal the transition to performdata operations on another page of a page partitioned memory.

The preferred embodiment, using a 32-bit address, has independent pagesizes for the different sets of external strobes. This feature allowsgreat flexibility in the design of external high speed, high-densitymemory systems and the use of slower external peripheral devices. Boththe STRB0 PAGESIZE and STRB1 PAGESIZE fields work in the same manner.The PAGESIZE field specifies the page size for the corresponding strobe.The PAGESIZE field is discussed herein-below. Table 1.1 illustrates therelationship between the PAGESIZE field and the bits of the address usedto define the current page and the resulting page size. The page size isfrom 256 words, with external address bus bits 7-0 defining the locationon a page, up to 2 Giga words with external address bus bits 30-0defining the location on a page. FIG. 5d illustrates an external addressshowing the relationship between the bits of an address defining thecurrent page and the bits of an address defining the addresses on acurrent page. As shown in Table 1.1, the field for external address busbits defining addresses on a page increases as the number of addressablewords on a page increases i.e. page size. Inversely, the number of bitsdefining the current page increases as the number of addressable pagesincreases. The trade off between bits used to address pages and words isshown in Table 1.1.

TABLE 1.1 External External address bus address bus bits defining bitsdefining PAGESIZE the current address on a Page size field page page(32-bit words) 11111 Reserved Reserved Reserved 11110 None 30-0 2³¹ = 2G 11101 30 29-0 2³⁰ = 1 G 11100 30-29 28-0 2²⁹ = 512 M 11011 30-28 27-02²⁹ = 256 M 11010 30-27 26-0 2²⁷ = 128 M 11001 30-26 25-0 2²⁶ = 64 M11000 30-25 24-0 2²⁵ = 32 M 10111 30-24 23-0 2²⁴ = 16 M 10110 30-23 22-02²³ = 8 M 10101 30-22 21-0 2²² = 4 M 10100 30-21 20-0 2²¹ = 2 M 1001130-20 19-0 2²⁰ = 1 M 10010 30-19 18-0 2¹⁹ = 512 K 10001 30-18 17-0 2¹⁸ =256 K 10000 30-17 16-0 2¹⁷ = 128 K 01111 30-16 15-0 2¹⁶ = 64 K 0111030-15 14-0 2¹⁵ = 32 K 01101 30-14 13-0 2¹⁴ = 16 K 01100 30-13 12-0 2¹³ =8 K 01011 30-12 11-0 2¹² = 4 K 01010 30-11 10-0 2¹¹ = 2 K 01001 30-10 9-0 2¹⁰ = 1 K 01000 30-9   8-0 2⁹ = 512 00111 30-8   7-0 2⁸ = 25600110-00000 Reserved Reserved Reserved

Changing from one page to another has the effect of inserting a cycle inthe external access sequence for external logic to reconfigure itself inan appropriate way. The memory interface control logic 104 keeps trackof the address used for the last access for each STRB_. When an accessbegins, the page signal corresponding to the active STRB_ goes inactiveif the access is to a new page. The PAGE0 and PAGE1 signals areindependent of one another, each having its own page size logic.

Referring to FIG. 5b control signals CE0_ and CE1_ are control enablesignals. CE0_ causes lines R/W0_, STRB0_ and PAGE0 to be in thehigh-impedance state. Similarly, control signal CE1_ cause lines R/W1_,STRB1_ and PAGE1 to be in the high-impedance state.

The preferred embodiment has separate enable signals for the data busand address bus. Signal DE_ controls the data bus which has 32-bits andsignal AE_ controls the address bus which has 31-bits. There are 4-bitsthat are used to define the current status of the peripheral port asdefined in Table 1.2. The status signals identify STRB0_ and STRB1_accesses, data reads and writes, DMA reads and writes, program reads,and SIGI (SIGnal Interlock) reads.

Signal interlock is used in configurations where there is sharing ofglobal memory by multiple processors. In order to allow multipleprocessors to access the global memory and share data in a coherentmanner, handshaking and arbitration is necessary.

TABLE 1.2 STAT3 STAT2 STAT1 STAT0 Status 0 0 0 0 STRB0_access, programread 0 0 0 1 STRB0_access, data read 0 0 1 0 STRB0_access, DMA read 0 01 1 STRB0_access, SIGI read 0 1 0 0 Reserved 0 1 0 1 STRB0_access, datawrite 0 1 1 0 STRB0_access, DMA write 0 1 1 1 Reserved 1 0 0 0STRB1_access, program read 1 0 0 1 STRB1_access, data read 1 0 1 0STRB1_access, DMA read 1 0 1 1 STRB1_access, SIGI read 1 1 0 0 Reserved1 1 0 1 STRB1_access, data write 1 1 1 0 STRB1 access, DMA write 1 1 1 1Idle

Control signal LOCK_ in the logic “0” state signals an interlockedaccess is under way. If LOCK_ is a logic “1” state, an interlockedaccess is not under way.

The memory map for the memory interface control registers is000100000_(h) for the global memory interface control register and000100004_(h) for the local memory interface control register. Sinceboth the global and local memory interfaces are functionally identicalfor purposes of this discussion, references to the global memoryinterface also applies to the local memory interface. The global memoryinterface control register has bits defined in terms of logic “0”s and“1”s that control the global memory interface. The memory controlregister defines the page sizes used for the two strobes, when thestrobes are active, wait states, and other similar operations thatdefine the character of the global memory interface.

The bit field definition of the global memory interface control registeris shown in FIG. 5e. Table 2.1 defines the register bits, the registerbit names, and the register bit functions. The bit field definition ofthe local memory interface control register is shown in FIG. 5f.Register bit functions and locations are very similar to global memoryinterface control register, thus Table 2.1 is adequate for describingthe local memory interface control register.

TABLE 2.1 Bit Position Bit Definition 0 CEO_(—) Value of the externalpin CEO_. The value is not latched. 1 CE1_(—) Value of the external pinCE1_. The value is not latched. 2 DE_(—) Value of the external pin DE_.The value is not latched. 3 AE_(—) Value of the external pin AE_. Thevalue is not latched. 4-5 STRB0 Software wait state generation forSTRB0_(—) SWW accesses. In conjunction with STRBO WTCNT, this fielddefines the mode of wait-state generation. 6-7 STRB1 Software wait stategeneration for STRB1_(—) SWW accesses. In conjunction with STRB1 WTCNT,this field defines the mode of wait-state generation.  8-10 STRB0Software wait-state count for STRB0_accesses. WTCNT This field specifiesthe number of cycles to use when software wait-states are active. Therange is zero (STRBO WTCNT = 000) to seven (STRBO WTCNT = 111). 11-13STRB1 Software wait-state count for STRB1_accesses. WCTNT This fieldspecifies the number of cycles to use when software wait-states areactive. The range is zero (STRB1 WTCNT = 000) to seven (STRB1 WTCNT =111) 14-18 STRB0 Page size for STRB0_(—) accesses. Specifies thePAGESIZE number of most significant bits (MSBs) of the address to beused to define the bank size for STRB0_accesses. 19-23 STRB1 Page sizefor STRB1_accesses. Specifies the PAGESIZE number of MSBs of the addressto be used to define the bank size for STRB1_accesses. 24-28 STRBSpecifies the address ranges over which STRB0_(—) ACTIVE and STRB1_areactive. 29 STRB When STRB SWITCH is 1, a single cycle is SWITCH insertedbetween back to back reads which switch from STRB0_(—) to STRB1_(—) (orSTRB1_(—) to STRB0_). When STRB SWITCH is 0, no cycle is insertedbetween these back to back reads. 30-31 Reserved Read as 0.

Table 2.2 illustrates the relationship between STRB ACTIVE and theaddress ranges over which STRB0_ and STRB1_ are active, and the size ofthe address range over which STRB0_ is active. STRB ACTIVE fieldcontrols global peripheral port 24, and LSTRB ACTIVE field controlslocal peripheral port 26. Table 2.3 illustrates the relationship betweenLSTRB ACTIVE and the address ranges over which LSTRB0_ and LSTRB1_ areactive, and the size of the address range over which STRB0_ is active.

TABLE 2.2 STRB0_(—) active STRB address ACTIVE STRB0_active rangeSTRB1_active field address range size address range 11111 ReservedReserved Reserved 11110 80000000-FFFFFFFF 2³¹ = 2 G None 1110180000000-BFFFFFFF 2³⁰ = 1 G C0000000-FFFFFFFF 11100 80000000-9FFFFFFF2²⁹ = 512 M A0000000-FFFFFFFF 11011 80000000-8FFFFFFF 2²⁸ = 256 M90000000-FFFFFFFF 11010 80000000-87FFFFFF 2²⁷ = 128 M 88000000-FFFFFFFF11001 80000000-83FFFFFF 2²⁶ = 64 M 84000000-FFFFFFFF 1100080000000-81FFFFFF 2²⁵ = 32 M 82000000-FFFFFFFF 10111 80000000-80FFFFFF2²⁴ = 16 M 81000000-FFFFFFFF 10110 80000000-807FFFFF 2²³ = 8 M80800000-FFFFFFFF 10101 80000000-803FFFFF 2²² = 4 M 80400000-FFFFFFFF10100 80000000-801FFFFF 2²¹ = 2 M 80200000-FFFFFFFF 1001180000000-800FFFFF 2²⁰ = 1 M 80100000-FFFFFFFF 10010 80000000-8007FFFF2¹⁹ = 512 K 80080000-FFFFFFFF 10001 80000000-8003FFFF 2¹⁸ = 256 K80040000-FFFFFFFF 10000 80000000-8001FFFF 2¹⁷ = 128 K 80020000-FFFFFFFF01111 80000000-8000FFFF 2¹⁶ = 64 K 80010000-FFFFFFFF 01110- ReservedReserved Reserved 00000

TABLE 2.3 LSTRB0_(—) active LSTRB address ACTIVE LSTRB0_active rangeLSTRB1_active field address range size address range 11111 ReservedReserved Reserved 11110 00000000-7FFFFFFF 2³¹ = 2 G None 1110100000000-3FFFFFFF 2³⁰ = 1 G 40000000-7FFFFFFF 11100 00000000-1FFFFFFF2²⁹ = 512 M 20000000-7FFFFFFF 11011 00000000-0FFFFFFF 2²⁸ = 256 M10000000-7FFFFFFF 11010 00000000-07FFFFFF 2²⁷ = 128 M 08000000-7FFFFFFF11001 00000000-03FFFFFF 2²⁶ = 64 M 04000000-7FFFFFFF 1100000000000-01FFFFFF 2²⁵ = 32 M 02000000-7FFFFFFF 10111 00000000-00FFFFFF2²⁴ = 16 M 01000000-7FFFFFFF 10110 00000000-007FFFFF 2²³ = 8 M00800000-7FFFFFFF 10101 00000000-003FFFFF 2²² = 4 M 00400000-7FFFFFFF10100 00000000-001FFFFF 2²¹ = 2 M 00200000-7FFFFFFF 1001100000000-000FFFFF 2²⁰ = 1 M 00100000-7FFFFFFF 10010 00000000-0007FFFF2¹⁹ = 512 K 00080000-7FFFFFFF 10001 00000000-0003FFFF 2¹⁸ = 256 K00040000-7FFFFFFF 10000 00000000-0001FFFF 2¹⁷ = 128 K 00020000-7FFFFFFF01111 00000000-0000FFFF 2¹⁶ = 64 K 00010000-7FFFFFFF 01110- ReservedReserved Reserved 00000

FIG. 5g shows the effect of STRB ACTIVE on the memory map of the globalmemory bus. Part (a) shows a condition with the STRB ACTIVE field=11110.In this configuration, STRB0_ is active over the entire address range ofthe global memory bus. Part (b) shows a condition with the STRB ACTIVEfield=10101. In this configuration, STRB0_ is active from address80000000_(h)-803FFFFF_(h) and STRB1_ is active form addresses80400000_(h)-FFFFFFFF_(h).

The distinction between global and local interface signals STRB0_ andSTRB1_ is dropped except where it is needed for the sake of clarity. Itshould be noted that signal names shown in the Figures with suffix “-”are equivalent to corresponding signal names with suffix “_” FIG. 6ashows that STRB_ transitions on the falling edge of H1. RDY_ is sampledon the falling edge of H1. Other general guidelines that apply to FIGS.6b to 6 i aid in understanding the illustrated logical timing diagramsof the parallel external interfaces:

1. Changes of R/W_ are framed by STRB_.

2. A page boundary crossing for a particular STRB_ results in thecorresponding PAGE signal going high for one cycle.

3. R/W_ transitions are made on an H1 rising.

4. STRB_ transitions are made on an H1 falling.

5. RDY_ is sampled on an H1 falling.

6. On a read, data is sampled on an H1 falling.

7. On a write, data is driven out on an H1 falling.

8. On a write, data is stopped being driven on H1 rising.

9. Following a read, the address, status and page signal change on H1falling.

10. Following a write, the address, status, and page signal change on H1falling.

11. The fetch of an interrupt vector over an external interface isidentified by the status signals for that interface (STAT or LSTAT) as adata read.

12. PAGE goes high, STRB_ goes high.

FIG. 6b illustrates a read, read, write sequence. All three accesses areto the same page and are STRB1_ accesses. Back to back reads to the samepage are single-cycle accesses. When transition from a read to a writeis done, STRB_ goes high for one cycle in order to frame the R/W_ signalchanging.

FIG. 6c illustrates that STRB_ goes high between back to back writes andbetween a write and a read to frame the R/W_transition.

FIG. 6d illustrates that when going from one page to another on back toback reads, an extra cycle is inserted and the transition is signalledby PAGE going high form one cycle. Also, STRB1_ goes high for one cycle.

FIG. 6e illustrates that on back to back writes and a page switchoccurs, an extra cycle is inserted and is signalled with PAGE high forone cycle.

Other combinations of write, read and page manipulations are shown inthe following FIGS. 6f to 6 i.

FIG. 6f illustrates a write same page followed by a read different pageand a write different page sequence.

FIG. 6g illustrates a read different page followed by a read differentpage and a write same page.

FIG. 6h illustrates a write different page followed by a write differentpage and a read same page sequence.

FIG. 6i illustrates a read same page followed by a write different pageand a read different page sequence.

Peripheral port 25 is also similarly constructed as peripheral port 24,but is controlled by lines SEL₂₅ independently from peripheral port 24,so that communication at peripheral ports 24, 25 and 26 can occursimultaneously and independently, so long as the buses 30, 34 and 38used by the ports are not simultaneously used. Peripheral port 25 isprimarily useful in communication with peripheral devices connected toperipheral bus 28. Accordingly, as shown in FIG. 5, peripheral port 25contains multiplexers 105 and 106 corresponding to like components inperipheral port 24.

A number of control lines are driven by buffers 104 in peripheral port25, also responsive to signals generated by controller 14 (on lineswhich are not shown, for purposes of clarity). These control linesoutput by peripheral port 25 include line R/W_, the “_” designationindicating active low, which specifies the direction of the flow of datathrough peripheral port 25. The control lines connected to peripheralport 25 further include line STRB_ (as in line R/W_, the “_” designationindicating active low) driven by buffers 104 responsive to controller14, which is a clock signal indicating to external memory that the setof address lines 30 a, 30 b, 34 a or 38 a connected to lines A_(n), asthe case may be, are presenting a valid address signal to addressmemory. Line RDY_ is an input to microcomputer 10 from peripheraldevices of peripheral bus 28. Line RDY_ is an input to microcomputer 10and, when driven to its low logic state, indicates that a peripheraldevice of peripheral bus 28 connected to data lines D_(n), address linesA_(n), and control lines R/W_ and STRB_ has completed a communicationcycle with microcomputer 10. Controller 14 responds to the RDY_ signalto cause peripheral port 25 to drive said lines to valid states otherthan that directed to the communication cycle which had ended with theRDY_ signal low. It should be noted that, because of the plurality ofbuses 30, 34, and 38 connected to peripheral ports 24, 25 and 26,peripheral ports 24, 25 and 26 can be operating simultaneously.

The preferred embodiment of microcomputer 10 as noted earlier utilizes asingle memory address space for all of the memories 16, 18 and 20 andincluding the address of memory external to microcomputer 10 andaccessible via peripheral ports 24, 25 and 26. Table 3 shows the memorymap of microcomputer 10 according to the preferred embodiment of theinstant invention.

TABLE 3 Address range (hexadecimal) Location/function 000000000 through000000FFF ROM 20 000100000 through 0001000FF I/O & other memory mappedregisters 0002FF800 through 0002FFBFF RAM 16 0002FFC00 through 0002FFFFFRAM 18 000300000 through 0FFFFFFFF External memory

Referring now to FIG. 7a, the construction and operation of controller14 is be described in detail. Controller 14 serves the purposes ofcontrolling the operation of the rest of microcomputer 10, so that thedesired operation specified by the instruction codes is be properlyexecuted.

Clock generator 200 in controller 14 is connected to terminals X1 and X2and generates the internal clock signals which are used in microcomputer10, for example the system clock on line CLKIN. If a crystal isconnected between terminals X1 and X2, clock generator 200 will, by wayof an internal oscillator, generate the system clock signal on lineCLKIN. Alternatively, an externally-generated clock can be applied toterminal X2, in which case the externally-generated clock signal willgenerate (such as by a divide-by-n in clock generator 200, not shown)the system clock signal on line CLKIN. Clock generator 200 furthergenerates clock signals Q1 and Q2, which occur on the first and thirdquarter-cycles of the period of the clock signal on line CLKIN, howevergenerated; clock signals Q1 and Q2 are used by memory access arbitrationlogic 206 in controller 14, as described below. Additionally, clocksignals H1 and H3 are generated and applied to the external terminals ofthe microcomputer 10. Clock signals H1 and H3 have periods equal totwice CLKIN. However generated, clock signals H1 and H3 are used by thecommunication ports, the CPU and other internal devices, and externallyconnected devices. Relative to the fetching of instruction codes and thecontrol of microcomputer 10 responsive to such instruction codes,controller 14 contains program counter 92, instruction register 94,control logic 202, and program counter control logic 204. Programcounter 92 is a thirty-two bit register, having an output connected toaddress lines 34 a of program bus 34. The function of program counter 92is to store the memory address of the next instruction to be fetched,decoded, and executed by microcomputer 10. In an instruction fetch cycle(which occurs during one period of the clock signal H3, the contents ofprogram counter 92 are placed upon address lines 34 a of program bus 34and the one of memories 16, 18 or 20 (or external memory) containing thememory location corresponding to the address signal presents theaddressed contents onto data lines 34 d of program bus 34; the contentsof the memory location having the address contained in program counter92 constitute the instruction code of the next instruction to bedecoded. Instruction register 94 is a thirty-two bit register which isconnected to data lines 34 d of program bus 34, and which receives thecontents of the contents of program counter 92 during the fetch cycle.

During the decode cycle, occurring in the next period of the systemclock signal on line H3 after the fetch cycle, the contents ofinstruction register 94 are decoded by control logic 202, to generatecontrol signals going from controller 14 to the functional circuits ofmicrocomputer 10. To accomplish this, a first portion of control logic202 contains combinatorial logic for decoding the instruction code. Suchcombinatorial logic (shown as logic 202 a in FIG. 4) can be realized indifferent well-known ways, such as a programmable logic array or aread-only memory. The thirty-two bit instruction code from instructionregister 94 is thus decoded by combinatorial logic 202 a into multipleoutput lines. Some of these lines are directly connected to functionsoutside of control logic 202, such as to program counter control logic204; other of these lines are input into sequential logic 202 b withincontrol logic 202. Sequential logic 202 b is operative to control thevarious functions of microcomputer 10 so as to allow the reading of dataoperands from memory by CPU 12, and so as to control the execution ofthe data processing operations on said operands by CPU 12. Sequentiallogic 202 b accomplishes this, of course, by way of additional outputlines emanating therefrom. The logic states of the output lines fromcontrol logic 202, whether from combinatorial logic 202 a or sequentiallogic 202 b, are thus determined by the instruction code received bycontrol logic 202 from instruction register 94. It should be noted thatthe drawing figures referred to herein do not show the connection ofthese control lines between controller 14 and such functional circuitryfor purposes of clarity.

It is therefore apparent that combinatorial logic 202 a in control logic202 can be decoding an instruction code which was stored in instructionregister 94 while controller 14 is causing the fetch of the followinginstruction from memory. In addition, sequential logic 202 b isoperative to control the operand read for a given instructionsimultaneously with the control of the execution of a previously fetchedinstruction. Accordingly, control logic 202 can be controllingmicrocomputer 10 in such a manner that portions of four differentinstruction codes may be carried out simultaneously. Such “pipelining”of the instruction codes will obviously reduce the time required toperform a given sequence of instructions.

FIG. 7b illustrates an example of how the pipeline is filled, andaccordingly how the pipeline operates for a typical instruction. In thefirst cycle of the system clock signal on line H3, instruction n isbeing fetched by controller 14, for example from one of memories 16, 18or 20. During the fetch cycle, however, program counter control logic204 has incremented the contents of program counter 92 to contain thememory location of the instruction code for instruction n+1. During thesecond cycle of the system clock signal on line CLKIN, the instructioncode for instruction n is being decoded by control logic 202. Alsoduring this second cycle, the contents of program counter 92 arepresented to address lines 34 a of program bus 34, and the instructioncode for instruction n+1 are fetched from program memory and loaded intoinstruction register 94.

During the third system clock cycle shown in FIG. 7b, sequential logic202 b is effecting a read from memory (e.g., RAM 16) of a data operandnecessary for instruction n via data bus 30. In addition, since theinstruction code for instruction n+1 has been fetched, the third cycleshown in FIG. 7b illustrates that instruction n+1 is being decoded bycombinatorial logic 202 a of control logic 202. Simultaneously with theread cycle for instruction n, however, the fetch of the instruction codefor instruction n+2 is being done, assuming there is no bus or memoryconflict with the read cycle for instruction n. As described above,generally the data operand is read by CPU 12 via data bus 30 while theinstruction code is read via program bus 34; assuming that both residein different memories 16, 18 or 20, or one residing in external memory,no bus conflict will occur.

During the fourth cycle of the system clock, instruction n will beexecuted under the control of sequential logic 202 b in control logic202, the read operation for instruction n+1 will be effected bysequential logic 202 b, the instruction code for instruction n+2 will bedecoded, and the instruction code for instruction n+3 will be fetched.Accordingly, the pipeline for microcomputer 10 will be filled, and theperformance of a sequence of instructions will be optimal, subject tobus conflicts and to memory access conflicts which may, for certaininstruction combinations, cause a wait cycle for one of the operations.

Data lines 30 d of data bus 30 are received by controller 14, forcontrol of the program flow in other than incremental fashion, such as abranch instruction, requiring that program counter 92 be loaded by CPU12 or from memory. For example, in the event of an unconditional branch,the value of an operand contained in the instruction code, read frommemory, or read from a register in CPU 12 may contain the address of thememory location containing the next instruction code to be executed.Program counter control logic 204 will then receive the value presentedupon data lines 30 d, and load program counter 92 accordingly, so thatprogram control can pass to the desired location.

As illustrated in FIG. 7a, program counter control logic 204 contains anadder 203 which receives the contents of program counter 92. Controllogic 202 (preferably combinatorial logic 202 a therein), controls adder203 so that generation of the contents of program counter 92 for thenext cycle may be performed in a variety of manners. As explained above,adder 203 may merely increment the prior contents of program counter 92,to step through the instruction sequence. However, program countercontrol logic 204 further contains an register 205, which can receive avalue from data lines 30 d of data bus 30. Program counter control logic204 can thus calculate the contents of program counter 92 in variousways. For example, branching to a relative address (relative to programcounter 92) may occur by way of loading register 205 with a valuepresented on data lines 30 d of data bus 30; this value could then beadded to the prior contents of program counter 92 to generate a newvalue for program counter 92. In addition, an absolute branch may beeffected by loading register 205 with the desired memory address fromdata lines 30 d of data bus 30, and by control logic 202 causing adder203 to perform a “zero-add” with the contents of register 205 forapplication to program counter.

It should be further noted that microcomputer 10 is capable ofperforming a “delayed” branch instruction, so that the branchinstruction is fetched three instructions before it is actually tooccur. The delayed branch instruction, when executed, loads register 205with the destination memory address of the branch as in a direct branch.However, control logic 202 will continue to increment the contents ofprogram counter 92 for the next three instructions following theexecution of delayed branch instruction. Upon the third instruction,adder 203 will apply the contents of register 205 to program counter 92,thereby effecting the branch while continuing to take advantage of thepipeline scheme. The pipeline may, of course, remain full after thebranch, as the destination location may continue to be incremented asbefore by adder 203.

Trap routines are supported in the preferred embodiment. Referring toFIG. 8a, trap instructions differ from branch instructions such thattrap instructions entail indirect addressing to arrive at the traproutine address while branch instructions entail relative addressing(which is less involved) to arrive at the branch address. As a result,the throughput of a pipeline machine suffers from the indirection thatoccurs when arriving at the trap routine address, because to execute atrap sequence, no instructions are fetched for the next three stagesafter a trap fetch. The address for the trap routine has not beendetermined. Consequently, the pipeline is flushed whenever a trapinstruction is executed. It should be noted that often when invoking atrap routine, it is advantageous to disable interrupts and freeze cachememory. The inherent nature of trap routines in many circumstances isincompatible with interrupts and cache memory and improvements remedysuch problems herein.

A delayed trap instruction (LAT) incorporated in the preferredembodiment remedies the undesirable effects of executing a trap routine.The LAT instruction is fetched three cycles before the trap instructionis executed. FIG. 8b shows the sequence of events in relation to systemcycle clock cycles of microcomputer 10. During system cycle clock cycle610 the LAT instruction is fetched from program memory. Decode cycle 620decodes the LAT instruction. Instructions are being fetched while theLAT instruction is executing thus maintaining the data flow from thepipeline. During the third system cycle clock cycle 630, the address ofthe first instruction of the trap routine is fetched from memory. Thememory can be any one of the memories discussed herein. Clock cycle 640saves the contents of the program counter (INS+4 representing the nextinstruction) to register PC+4 and loads the fetched trap address intoprogram counter. Thus, during the next system cycle clock cycle, thefirst instruction of the trap routine is fetched from the memory. Usingthe LAT instruction one system cycle clock cycle is used to initiate thetrap sequence, thus maintaining a constant data flow from the pipeline.The program counter value representing the next instruction is storedbefore loading the address of the first instruction of the trap routinethus ensuring program execution to resume at the point prior toexecuting the trap routine.

FIG. 8c shows a trap vector table which contains trap addresses (TA)that corresponds to locations for the first instruction of traproutines. The trap address is the sum of the trap vector table pointer(TVTP) and trap number N (TN). The summing of the TVTP and TN occursduring system cycle clock cycle 620. Control logic 202 decodes the LATinstruction fetched during system cycle clock cycle 610 and instructsadder 209 to sum operands TVTP and TN during system cycle clock cycle620.

For example, shown in FIG. 7a is trap address logic 208 containing trapvector table pointer register 207, adder 209, program counter+4 (PC+4)register 210. During system cycle clock cycle 620 (after fetching theLAT instruction, control logic 202 decodes the LAT instruction. Trapnumber (TN) which specifies a particular trap routine is extracted fromthe LAT instruction by decoder 202 a and combined with trap vector tablepointer (TVTP) register 207 using adder 209. The result is a trapaddress (TA) specifying a location in memory that contains the trapvector which is the address of the first instruction for the traproutine to be executed. The contents of the TVTP register 207 can bealtered thus offering even more flexibility in placing trap routineswithin the memory map of microcomputer 10. During the third cycle of thesystem clock after fetching the LAT instruction, the trap address issent to memory via bus 30 a to access the trap vector that is receivedon bus 30 d. Access to memory is in accordance to above herein describedtechnique. On the fourth cycle of the system clock, the current contentsof program counter register 92 is transferred to PC+4 register 210 andthe trap vector is transferred to program counter 92. Thus, programcounter register 92 contains the first instruction of the trap routine,and the previous contents of the program counter register 92 are storedin PC+4 register 210. When the trap routine is complete, the contents ofPC+4 are transferred back to program counter register 92 and programexecution resumes at the point where the trap routine interrupted.Advantageously, the trap routine interrupts program execution using onlyone system cycle clock cycle and continues to take advantage of thepipelining scheme by keeping the pipeline full while indirection ofprogram execution is occurring.

FIG. 8d shows the flow chart of the steps used in the execution of thelink and trap (LAT) instruction incorporated in the preferred embodimentof microcomputer 10 where if condition 171, if not satisfied the normaloperation continues and if the condition 171, is satisfied, theninterrupt and cache status 172, is saved by freezing the cache anddisabling the interrupt 173. Program counter of LAT plus Nth instruction174 is saved after which the program counter is loaded 175 with the trapvector containing the address of the first instruction of the traproutine. The LAT trap routine is then executed 176. After execution ofthe trap routine, the interrupt and cache status are restored wherebythe cache is no longer frozen (assuming it was not frozen before theLAT) and the interrupt vector is no longer disabled (assuming it was notdisabled before LAT) 177. Upon successful completion of these steps, thenormal operation continues as if the condition had never been satisfied178.

U.S. patent application Ser. No. 347,967 gives more details about theoperation of conditional instructions which is incorporated herein byreference.

A repeat block delayed instruction (RPTBD) is incorporated in thepreferred embodiment. Advantages of the RPTBD instruction aresubstantially the same as the delayed branch and trap instructions:single system clock cycle execution and maintaining throughput by notflushing the pipeline. A distinct instruction called a repeat blockinstruction (RPTB) (without delay) is also implmented and allows a blockof instructions to be repeated a number of times without penalty forlooping; however, in RPTB the pipeline is flushed while the values ofrepeat start (RS) and repeat end (RE) registers contained in blockrepeat register 164 are being determined. It should be noted that therepeat count (RC) register (contained in block repeat register 164) isloaded before executing the RPTB instruction.

The repeat block delayed instruction (RPTBD) compared to RPTBadvantageously further fetches the next three instructions before therest of the RPTBD instruction is executed. FIG. 8e shows the sequence ofevents in relation to the system cycle clock cycles of microcomputer 10.During system cycle clock cycle 650, the RPTBD instruction is fetchedfrom program memory. Decode cycle 660 decodes the RPTBD instruction.Instructions are continually fetched while the RPTBD instruction iscycled through the pipeline. During the third system cycle clock cycle670, the decoded RPTBD instruction containing data that is used todetermine the repeat end (RE) address for the block of instructions issent to CPU 12. Clock cycle 680 causes CPU 12 to calculate the repeatend (RE) address. During clock cycle 690 the program counter (PC) isloaded into repeat start (RS) register 223 signaling the start of RPTBDinstruction; thus, the first instruction of the repeat block is fetchedfrom the memory. The block of instructions is repeated until the numberin the repeat count (RC) register is reached. Program executioncontinues. The pipeline is not flushed because the RPTBD instruction isfetched three system cycle clock cycles before executing the repeatblock delay (RPTBD) instruction. A constant data flow from the pipelineis maintained.

For example, shown in FIG. 8f is repeat block delay logic 220 located inCPU 12. Contained within repeat block delay logic are repeat blockregister 164. It should be noted that repeat count (RC) register isloaded with a proper value. An RPTBD instruction is loaded intoinstruction register 94 and is decoded. Data and control signals aresent to CPU 12 along with program counter 92 (PC) where the data and PCare combined and stored in repeat end (RE) register 222. A signal online STORE from controller 14 places the contents of PC (92) to repeatstart (RS) register 223 via repeat start (RS). Each time the programcounter (PC) is incremented during the execution of the block ofinstructions, comparator 224 compares the value of the PC with RE todetermine whether PC equals the RE value. If not, then PC via programbus 34 a fetches the next instruction. If PC equals RE, then comparator224 checks if the zero flag is set by the repeat count (RC) register 221via signal ZERO signaling a zero count. If not, comparator 224decrements RC by 1 via signal DECR and a signal LOAD is sent to RSregister 223 loading the contents to PC register 92. Thus, the contentsof PC register 92 fetch the first instruction of the repeat block. Therepeat block is repeated until the zero flag is set signaling the numberof repetitions is complete. Then, PC is not loaded with the value in RSregister 223, and PC is incremented past the RE value. Program executioncontinues.

FIG. 8g. is a flow chart of the steps involved in implementing the RPTBDinstruction. Operations commence with fetching of the RPTBD instructionin start block 225. Then step 226 decodes the RPTBD instruction. Nextstep 227 calculates repeat end (RE). Then step 228 stores the value REto the RE register and PC is stored to RS register. Step 229 beginsexecution of the block of instructions. Next step 230 executes aninstruction. Test step 231 determines whether PC equals RE. If not,branch to step 231 a to increment the PC and return to step 230 toexecute another instruction. Otherwise (if so) then operations proceedto test step 232 to determine whether RC=0. If not, then operationsbranch to step 232 a decrementing RC by 1 and to step 232 b loading RSto PC before returning to execute the repeat block. Otherwise (if RC=0),then operations proceed to step 233 whereupon PC is incremented to REplus 1 completing the repeat block delay instruction, and programexecution continues.

Controller 14 further includes interrupt logic 250, which is connectedto a plurality of external terminals of microcomputer 10, to controller14, and to various of the functions within microcomputer 10. Interruptlogic 250 serves the purpose of receiving interrupt signals presented tomicrocomputer 10 on the RESET terminal and on terminals INT0 throughINT3, and receiving interrupt signals generated internally tomicrocomputer 10 from various functions such as DMA coprocessor 22. Anexample of such an internal interrupt signal is shown in FIG. 10 by line312, which is an interrupt signal from DMA coprocessor 22. Containedwithin CPU 12 as a control register is an interrupt enable register, thecontents of which specify whether each of the interrupt signals isenabled or disabled. Responsive to the receipt of an enabled interruptsignal, either from terminals INT0 through INT3 or from internal tomicrocomputer 10, and if controller 14 indicates that an access to aninput/output memory location is not current, interrupt logic 250 willcause program counter 92 to be loaded with a memory addresscorresponding to the particular interrupt signal (the “interruptvector”), and the execution of the program will continue from theinterrupt vector location forward. Responsive to an instruction codegenerally included in the interrupt handling routine called by theinterrupt vector, interrupt logic 250 generates interrupt acknowledgesignals on line INTA for external interrupts and, for example, on line314 for the internal interrupt signal for DMA controller 22. Controller14 causes the prior contents of program counter 92 to be stored in apredetermined memory location (generally called a “stack”), so that thelocation of the instruction code which would have been fetched next willbe reloaded after the interrupt has been serviced.

External memory devices connected to peripheral port 25, for example,can be used to store the instruction codes for the program beingexecuted by microcomputer 10. However, the access time of the externalmemory may be sufficiently slower than that of memories 16, 18 and 20 sothat controller 14 would have to wait a full system clock period afterpresenting the contents of program counter 92 on address lines 34 a ofprogram bus 34, before the instruction code would be presented by theexternal memory onto data lines 34 d of program bus 34 for receipt byinstruction register 94. For any given instruction being executed, oftenthe next instruction code to be executed is located in a memory locationin program memory which has an address close to the address of the giveninstruction. Such proximity in program memory of the next instructioncode occurs especially often in digital signal processing applications,because of the repetitive nature of the calculations therein. Ainstruction cache memory 36 as shown in FIG. 1 is one way to takeadvantage of this repetitive nature.

Instruction cache 36, as described above relative to FIG. 1, isconnected to address lines 34 a and data lines 34 d of program bus 34.As shown in FIG. 9, instruction cache 36 contains 128-word memory 140which is organized into four 32-word segments 140 a, 140 b, 140 c and140 d. Instruction cache 36 further contains segment start registers 144a, 144 b, 144 c, and 144 d each of which stores a predetermined numberof the most significant bits of the addresses for the instruction codesstored in the respective segments 140 a, 140 b, 140 c, and 140 d. In thepreferred embodiment of the invention, since the address signal isthirty-two bits wide, and because each of segments 140 a, 140 b, 140 cand 140 d contain thirty-two (2⁵) bits, the number of bits stored bysegment start registers 144 a, 144 b, 144 c and 144 d is twenty-seven.Associated with each of the thirty-two words stored in each of segments140 a, 140 b, 140 c and 140 d is a flag bit 142 for indicating thepresence of the instruction code within the corresponding word when set,and for indicating the absence of an instruction code therewithin whennot set. MSB comparator 146 is connected to address lines 34 a, forcomparing the twenty-seven most significant bits on address lines 34 awith the contents of the segment registers 144 a, 144 b, 144 c, and 144d. LSB decoder 148 is also connected to address lines 34 a and, as willbe discussed below, is for decoding the five least significant bits ofthe address lines 34 a. Input/output buffer 150 is connected betweendata lines 34 d and segments 140 a, 140 b, 140 c and 140 d, forcontrolling the output of instruction cache 36 to program bus 34.Instruction cache 36 further contains least-recently-used (LRU) stack152 which points to segment registers 144 a, 144 b, 144 c and 144 dcorresponding to the order in which they were most recently used.

In operation during a fetch cycle, where the memory address of theinstruction code to be fetched does not reside in RAMs 16 or 18, or inROM 20, but in external memory, MSB comparator 146 receives thetwenty-seven most significant bits of the address signal on addresslines 34 a of program bus 34, and compares them to the contents ofsegment registers 144 a, 144 b, 144 c and 144 d. In the event that amatch is found, LSB decoder 148 then decodes the five least significantbits of the address signal on address lines 34 a, to select the one offlag bits 142 corresponding to the one of thirty-two words within eithersegment 140 a, 140 b, 140 c or 140 d of the full address signal onaddress lines 34 a. If the corresponding flag bit 142 is set,input/output buffer 150 will present the contents of the correspondingword within the matched segment 140 a, 140 b, 140 c or 140 d onto datalines 34 d of program bus 34, and the access of the instruction codestored in instruction cache 36 is completed. In addition, the segmentregister 144 a, 144 b, 140 c or 140 d which was matched is pointed to bythe top of LRU stack 152, and the non-matching segment register 144 a,144 b, 144 c or 144 d is pointed to by the bottom of LRU stack 152. Thesegment pointed to by the bottom of LRU stack 152 is the least recentlyused one of segments 140 a, 140 b, 140 c and 140 d, and will be thesegment which is replaced in the event of a cache “miss”, as will beexplained below.

In some applications, some of the words in segments 140 a, 140 b, 140 cand 140 d may not be loaded with instruction codes. Therefore, thepossibility arises that the twenty-seven most significant bits onaddress lines 34 a of program bus 34 will match the contents of one ofsegment registers 144 a, 144 b, 144 c and 144 d, but the word within thematching one of segments 140 a, 140 b, 140 c or 140 d corresponding tothe five least significant bits will not contain an instruction code. Inthis event, the flag bit 142 for the corresponding word is not set(i.e., contains a “0” logic state). This is a cache “miss”, and theinstruction code for the corresponding address must be read from theaddressed memory location in external memory; input/output buffer 150will load the instruction code from data lines 34 d of program bus 34into the corresponding word within the matched segment 140 a, 140 b, 140c or 140 d, with the corresponding flag bit 142 being set to a “1” logicstate. However, since the most significant bits matched one of segmentregisters 144 a, 144 b, 144 c and 144 d, the matching one of segmentregisters 144 a, 144 b, 144 c or 144 d will be pointed to by the top ofLRU stack 152, and the other one of segment registers 144 a, 144 b, 144c and 144 d will be pointed to by the bottom of LRU stack 152.

In the event that the nineteen most significant bits on address lines 34a of program bus 34 match the contents of neither one of segmentregisters 144 a, 144 b, 144 c or 144 d, a cache “miss” also occurs. Inthis event, flag bits 142 will be reset for all words in the one ofsegments 140 a, 140 b, 140 c or 140 d which corresponds to the leastrecently used one of segments 140 a, 140 b, 140 c and 140 d, which ispointed to by the bottom of LRU stack 152. The twenty-seven mostsignificant bits on address lines 34 a will then be stored into thesegment register 144 a, 144 b, 144 c or 144 d, for the least recentlyused one of segments 140 a, 140 b, 140 c or 140 d, and the instructioncode received from external memory on data lines 34 d will be loadedinto the corresponding one of the thirty two words in the “new” segmentcorresponding to the five least significant bits on address lines 34 a,and its flag bit 142 will be set to a “1” state. The one of segmentregisters 140 a, 140 b, 140 c or 140 d containing the newly loadedinstruction code will be pointed to by the top of LRU stack 152, withthe other segment register 140 a, 140 b, 140 c or 140 d pointed to bythe bottom of LRU stack 152.

A status register is contained in CPU 12 (not shown). Three bits arecontained within the status register which control the operation ofinstruction cache in a manner apart from that described above. A firstbit is the cache clear bit which, when set, resets all of flag bits 142,in effecting clearing the contents of instruction cache 36. A secondsuch control bit in the status register is the cache enable bit which,when set, enables operation of instruction cache 36; conversely, whenthe cache enable bit is not set, instruction cache 36 is disabled to theextent that it is in no way accessed, regardless of the address value onaddress lines 34 a. During such time that the cache enable bit is notset, the contents of segment registers 144 a, 144 b, 144 c and 144 d,flag bits 142, and the words within segments 140 a, 140 b, 140 c and 140d themselves, are not alterable. The third such bit within the statusregister is the cache freeze bit. When the cache freeze bit is set, onlyfetches from instruction cache 36 are allowed in the event of cache“hits”. In the event of a cache “miss”, however, no modification of flagbits 142, segment registers 144 a, 144 b, 144 c and 144 d, or LRU stack152 is performed; the instruction code fetch is merely performed fromexternal memory without affecting instruction cache 36.

Referring now to FIGS. 1 and 10, the construction and operation of DMAcoprocessor 22 will be described. Direct memory access operations areuseful in moving blocks of stored data from one memory area to anotherwithout intervention of the central processing unit (e.g., CPU 12). Formicrocomputer 10 described herein, direct memory access is also usefulfor moving blocks of data between external memory and on-chip memories16 and 18. As shown in FIGS. 1 and 8, DMA communications of data occuron DMA bus 38 and receipt of control and source/destination addressinformation occur from peripheral bus 28.

It should be noted that peripheral bus 28 contains address lines 28 aand data lines 28 d, which carry address information and data,respectively, in the same manner as data bus 30, program bus 34, and DMAbus 38 discussed heretofore. Referring back to FIG. 1, it is apparentthat address lines 28 a and data lines 28 d of peripheral bus 28 aredirectly connected, and therefore correspond, to the lines I/OAn andI/ODn, respectively, at the output of peripheral port 25. Accordingly,in order to present an address, or communicate data from or to,peripheral bus 28, the desired address is made to correspond to a valuewithin an address space serviced by peripheral port 25. Thememory-mapped registers within DMA coprocessor which are described beloware therefore within the memory address space 0001000A0_(h) through0001000FF_(h).

For purposes of clarity, the DMA coprocessor 22 shown in FIG. 10 showsin detail only one DMA channel 21. It should be noted that fiveadditional DMA channels similar to DMA channel 21 are also incorporatedin DMA coprocessor 22 of the preferred embodiment. DMA channel 21 hassome registers that have a corresponding auxiliary register. Thoseauxiliary registers are used during split-mode operation that splits oneDMA channel to have separate source and destination paths that bound onehalf to the input FIFO and the other half to the output FIFO of acommunication port. The channel utilizing the non-auxiliary registers iscalled the primary, and the channel utilizing the auxiliary registersfor DMA transfers is called the auxiliary channel. Thus, the functionsof the auxiliary registers are similar to their non-auxiliarycounterparts. Auxiliary registers are used during split-mode operationand not used during unified mode. A detailed description of thesplit-mode operation will be described herein below.

DMA channel 21 contains control register 300, transfer counter register301, auxiliary count register 302, destination address register 303,destination index register 304, source address register 305, sourceindex register 306, link pointer register 307 and auxiliary pointer 308,each of which are connected to address lines 28 a and data lines 28 d ofperipheral bus 28 and each of which are mapped into correspondingaddress locations of the memory address space of microcomputer 10. DMAchannel 21 further contains data register 309, which is connected todata lines 38 d of DMA bus 38. Address lines 38 a of DMA bus areconnected to destination address register 303, source address register305, link pointer register 307 and auxiliary pointer 308. Control logic310 is connected to control register 300 so that the contents of thebits therein will effect the control of DMA channel 21. Control logic310 generates a signal to transfer counter register 301 and auxiliarycount register 302 on line DECR and DECRX respectively and receives asignal from transfer counter 301 and auxiliary count register 302 online ZERO and ZEROX respectively. Control logic 310 provides a LOADsignal to destination address register 303 and source address register305; control logic 310 further provides signals to data register 309 onlines WRITE and STORE. To effect the desired memory read/writeoperations, control logic 310 generates read/write signals which areconnected to controller 14, so that controller 14 can generate suchcontrol signals to memories 16, 18 and 20, and to peripheral ports 24,25 and 26, as discussed above relative to memory access control bycontroller 14.

Control register 300 is a thirty-two bit addressable register which iswritten to in order to configure DMA channel 21. The DMA channel 21 isvery flexible as evident from the multitude of different controlvariations configurable by setting the bits in the various positions ofcontrol register 300 to either a logic “1” or “0” state. Each of thethirty-two control bits in the control register 300 are described indetail in Table 4.

TABLE 4 DMA Channel Control Register Bit Position Bit Definition 0-1 DMAPRI DMA PRIority. Defines the arbitration rules to be used when a DMAchannel and the CPU are requesting the same resource. Affects unifiedmode and the primary channel in split mode. 2-3 TRANSFER Defines thetransfer mode used by the DMA MODE channel. Affects unified mode and theprimary channel in split mode. 4-5 AUX Defines the transfer mode used byDMA channel. TRANSFER Affects the auxiliary channel in split mode MODEonly. 6-7 SYNCH Determines the mode of synchronization to be MODE usedwhen performing data transfers. Affects unified mode and the primarychannel in split mode. If a DMA channel is interrupt driven for bothreads and writes, and the interrupt for the write comes before theinterrupt for the read, the interrupt, for the write is latched by theDMA channel. After the read is complete, the write will be able to bedone. 8 AUTO If AUTO INIT STATIC = 0, the link pointer is INITincremented during autoinitialization. If AUTO STATIC INIT STATIC = 1,the link pointer is not incremented (it is static) duringautoinitialization. Affects unified mode and the primary channel insplit mode. 9 AUX AUTO If AUTO INIT STATIC = 0, the link pointer is INITincremented during autoinitialization. STATIC If AUTO INIT STATIC = 1,the link point is not incremented (it is static) duringautoinitialization. Affects the auxiliary channel in split mode only. Itis useful to keep the link pointer constant when autoinitializing fromthe on-chip com ports of other stream oriented devices such a FIFOs. 10AUTOINIT If AUTO INIT SYNCH = 0 then the interrupt SYNCH enabled by theDMA interrupt enable register in the CPU used for DMA reads is ignoredand the autointialization reads are not synchronized with any interruptsignals. If AUTO INIT SYNCH = 1, then the interrupt enabled by the DMAinterrupt enable register in the CPU used for DMA reads is also used tosynchronize the autoinitialization reads. Affects unified mode and theprimary channel in split mode. 11 AUX Affects split mode only. If AUXAUTOINIT AUTOINIT SYNCH = 0 then the interrupt enabled by the SYNCH DMAinterrupt enable register in the CPU used for DMA reads is ignored andthe autoinitialization reads are not synchronized with any interruptsignals. If AUTOINIT SYNCH = 1, then the interrupt enabled by the DMAinterrupt enable register in the CPU used for DMA reads is also used tosynchronize the autoinitialization reads. Affects the auxiliary channelin split mode only. 12 READ BIT If READ BIT REV = 0, then the sourceaddress is REV modified using 32-bit linear addressing. If READ BIT REV= 1, then the source address is modified using 24-bit bit-reversedaddressing. Affects unified mode and the primary channel in split mode.13 WRITE BIT If WRITE BIT REV = 0, then the source address REV ismodified using 32-bit linear addressing. If WRITE BIT REV = 1, then thesource address is modified using 24-bit bit-reversed addressing. Affectsunified mode and the auxiliary channel in split mode. 14 SPLIT Controlsthe DMA mode of operation. If SPLIT MODE MODE = 0, then DMA transfersare memory to memory. This is referred to as unified mode. If SPLIT MODE= 1, the DMA is split into two channels allowing a single DMA channel toperform memory to communication port and communication port to memorytransfers. May be modified by autoinitialization in unified mode or byautoinitialization by the auxiliary channel in split mode. 15-17 COMDefines a communication port to be used for PORT DMA transfers. If SPLITMODE = 0, then COM PORT has no affect on the operation of the DMAchannel. If SPLIT MODE = 1, then COM PORT defines which of the sixcommunication ports to use with the DMA channel. May be modified byautoinitialization in unified mode or by autoinitialization by theauxiliary channel in split mode. 18 TCC Transfer counter interruptcontrol. If TCC = 1, a DMA channel interrupt pulse is sent to the CPUafter the transfer counter makes a transition to zero and the write ofthe last transfer is complete. If TCC = 0, a DMA channel interrupt pulseis not sent to the CPU when the transfer counter makes a transition tozero. Affects unified mode and the primary channel in split mode. DMAchannel interrupts to the CPU are edge triggered. 19 AUX TCC Auxiliarytransfer counter interrupt control. If AUX TCC = 1, a DMA channelinterrupt pulse is sent to the CPU after the auxiliary transfer countermakes a transition to zero and the write of the last transfer iscomplete. If AUX TCC = 0, a DMA channel interrupt pulse is not sent tothe CPU when the auxiliary transfer counter makes a transition to zero.Affects the auxiliary channel in split mode only. The DMA channelinterrupts pulse is sent if TCC = 1 and the transfer counter is 0 andthe write of the last transfer is complete or if AUX TCC = 1 and thetransfer counter is 0 and the write of the last transfer is complete. 20TCINT Transfer Counter interrupt flag. This flag is set FLAG to 1whenever a DMA channel interrupt pulse is sent to the CPU due to atransfer counter transition to zero and the write of the last transfercompleting. Whenever the DMA control register is read this flag iscleared unless the flag is being set by the DMA in the same cycle as theread. In this case TCINT is not cleared. Affected by unified mode andthe primary channel in split mode. 21 AUX Auxiliary transfer counterinterrupt flag. This TCINT flag is set to 1 whenever a DMA channelinterrupt FLAG pulse is sent to the CPU due to an auxiliary transfercounter transition to zero and the write of the last transfercompleting. Whenever the DMA control register is read, this flag iscleared unless the flag is being set by the DMA in the same cycle as theread. In this case AUX TCINT is not cleared. Affected by the auxiliarychannel in split mode only. Since only one DMA channel interrupt isavailable for a DMA channel, you can determine what event set theinterrupt by examining TCINT FLAG and AUX TCINT FLAG. 22-23 START Startsand stops the DMA channel in several different ways. Affects unifiedmode and the primary channel in split mode. 24-25 AUX Starts and stopsthe DMA channel in several START different ways. Affects the auxiliarychannel in split mode only. The START and AUX START bits, if used tohold a channel in the middle of an autoinitialization sequence, willhold the autoinitialization sequence. If the START or AUX START bits arebeing modified by the DMA channel (for example, to force a halt code of10 on a transfer counter terminated block transfer) and a write is beingperformed by an external source to the DMA channel control register, theinternal modification of the START or AUX START bits by the DMA channelhas priority. 26-27 STATUS Indicates the status of the DMA channel.Updated in unified mode and by the primary channel in split mode.Updates are done every cycle. 28-29 AUX Indicates the status of the DMAchannel. STATUS Updated by the auxiliary channel in split mode only. Insplit-mode, updates are done every cycle. The STATUS and AUX STATUS bitsare used to determine the current status of the DMA channels and todetermine if the DMA channel has halted or been reset after writing tothe START or AUX START bits. 30-31 Reserved Read as 0.

Source address generator 320 calculates a source address by adding thecontents of source address register 305 with the contents of thecorresponding source index register 306 with the result stored in sourceaddress register 305 whereby source address register 305 contains thesource address for the data to be transferred from. Likewise,destination address generator 330 calculates a destination address byadding the contents of destination address register 303 with thecontents of the corresponding destination index register 304 with theresults stored in destination address register 303 whereby destinationaddress register 303 contains the destination address for the data to betransferred to. Depending upon the logic state of bit 12 (READ BITREV)and of bit 13 (WRITE BITREV) in control register 300, the source anddestination address generators, respectively can perform either linear(normal addition) or bit reversed (reverse carry propagation) addition.The source index register 306 and the destination source index register304 are signed values thus when combined respectively with the sourceaddress register 305 and destination address register 306, addresses maybe incremented or decremented for DMA accesses. Data register 309 is atemporary register for buffering data from and to data lines 38 d of DMAbus 38; the value of data line 38 d is loaded into data register 309responsive to a signal on line WRITE, and the contents of data register309 are presented to data line 38 d responsive to a signal on lineSTORE.

Control logic 310 is further connected to controller 14, so that theoperation of DMA channel 21. is controlled consistently with theoperation of the rest of microcomputer 10. As will be evident below, theDMA can be interrupt synchronized, so that the receipt or transmissionof data from external sources can be done without conflict among CPU 12,DMA coprocessor 22, and the external source. START bit 300 a of controlregister 300 enables and disables the operation of DMA channel 21, whileAUX START bit 300 b of control register 300 enables and disables thesplit-mode operation of DMA coprocessor. A logic “1” state in thecorresponding bit position enables operation and a logic “0” statedisables operation. TCC bit 300 c of control register 300 controls readylogic 310 so that, when TCC bit 300 c is set to a “1” state, the DMAtransfer is terminated upon transfer counter register 301 reaching zero.AUX TCC bit 300 d of control register 300 controls ready logic 310 thesame way as the TCC bit 300 c except that the DMA transfer is terminatedupon auxiliary count register 302 reaching zero. Sync bits 300 e and 300f allow configuration of the synchronization of DMA channel 21 witheither the source or destination of the transferred data. TCINT bit 300g, when set to a “1” state, creates an internal interrupt when thecontents of transfer counter register 301 reach zero. Control logic 310is connected to controller 14 to generate an internal interrupt signalon line 312, and to respond to the interrupt acknowledge signal frominterrupt logic 250 on line 314, AUX TCINT bit 300 h functions likeTCINT except creates an internal interrupt when the contents of theauxiliary count register 302 reach zero. Interrupt lines responding are312 a and 314 a for sending an interrupt and receiving an acknowledgesignal to and from interrupt logic 250, respectively.

The DMA operation performed under the control of DMA controller 22 canbe interrupt-driven in conjunction with controller 14, so that theoperation can be externally controlled. As described above relative tocontroller 14, internally generated interrupts are received and handledby interrupt logic 250 in controller 14. Control logic 310 furthergenerates an interrupt request signal to controller 14 on line 313, andreceives an interrupt active signal therefrom on line 315. The interruptrequest signal on line 313 indicates that DMA controller is waiting fora DMA-related interrupt generated by an external device, and theinterrupt active signal on line 315 indicates that such an interrupt hasbeen received by controller 14 and is to be serviced. Synchronization iscontrolled by control logic 310 generating the interrupt request signalat predetermined points in the DMA transfer cycle and waiting for theinterrupt active signal before proceeding; the selection of thesynchronization points is made by loading bits 300 e and 300 f ofcontrol register 300. Table 5 lists the synchronization modesperformable by DMA coprocessor 22.

TABLE 5 Bits 300 e/f Interrupt synchronization 00 No interruptsynchronization. 01 Source synchronization; DMA read on interrupt, writewhen available 10 Destination synchronization; DMA read when available;write on interrupt 11 Source and destination sync; DMA read oninterrupt; write on next interrupt

In operation, the transfer counter register 301, destination addressregister 303, and source address register 305 of DMA channel 21 arefirst loaded with the initial conditions as desired. Each of theseregisters 301, 303 and 305 are addressable by address lines 28 a ofperipheral bus 28 using a normal memory write instruction executed bymicrocomputer 10; implicit in FIG. 10 for each of the registers 301, 303and 305 is decoding logic for controlling the loading of said registers301, 303 and 305 when addressed. Control register 300 is also loaded byaddressing its memory location, thereby configuring DMA channel 21 asdesired. Control logic 310 is responsive to START bit 300 a being set toa “1” state, enabling the operation of DMA controller 22.

By way of example, control register 300 of DMA channel 21 is loaded withthe necessary data so that the selected synchronization mode will bedestination synchronization. Thus, control logic 310 will first disablecontrol logic 310 from accepting internal interrupt signals frominterrupt logic 250. The source address register 305 of DMA channel 21is loaded with the address of the source memory. The destination addressregister 303 (of DMA channel 21) is loaded with the address of thedestination memory, and transfer counter 301 is loaded with the numberof words to be transferred. According to the example, control register300 is configured for sequential transfer of data for both the sourceand the destination data thus, source index register 306 and destinationindex register 304 are set to 1. The START bit of control register 300initiates the DMA transfer.

Control logic 310 sends signals CALS and CALD to source address anddestination address generators to calculate source and destinationaddresses for data and to store the addresses in the source addressregister 305 and destination address register 303. Upon a LOAD pulsefrom control logic 310 to source address register 305, the contents ofsource address register 305 will be placed on address lines 38 a of DMAbus 38. The addressed memory location (either in external memory viaperipheral port 24 or 26, or in memories 16, 18 or 20) will be read.Control logic 310 will pulse the STORE line connected to data register309, to load the value on data lines 38 d of DMA bus 38 into dataregister 309. After the read operation, control logic 310 pulses CALSand the contents of source index register 306 is added to the contentsof source address register 305 with the result written back to sourceaddress register 305. Also during this time, DECR is pulsed by controllogic 310 decrementing the count of the transfer counter register 302 byone.

According to the destination synchronization mode selected by controlregister 300, control logic 310 will now generate an interrupt requestsignal on line 313 to interrupt logic 250. Responsive to controller 14receiving an enabled interrupt directed to DMA, such an eventcommunicated to DMA controller by the interrupt active signal on line315, control logic 310 will begin the DMA write operation. Accordingly,the contents of destination register 303 will be presented upon addresslines 38 a of DMA bus 38 responsive to control logic 310 presenting theLOAD signal to destination address register 303. Control logic 310 alsopulses the WRITE line connected to data register 309, so that thecontents of data register 309 are presented upon data lines 38 d of DMAbus 38. The addressed memory location is accessed as described before,with controller 14 providing the necessary write control signals toeffect the writing of the contents of data register 308 into theaddressed location.

After completing the write, the contents of destination address register303 are added to the contents of destination index register 304 bycontrol logic 310 via line CALD with the result written back todestination address register 303. It should be noted that separatesource and index registers allows for variable step sizes or continualreads and/or writes from/to a fixed location.

DMA transfers continue until transfer counter 301 goes to zero and thewrite of the last transfer is complete. The DMA channel 21 has theability to reinitialize another set of source and destination addressesto perform another DMA transfer without intervention by CPU 12. When theTRANSFER MODE bits are set to 10 (refer to Table 6) in control register300, the link pointer register 307 initializes the registers whichcontrol the operation of the DMA channel. The link pointer register 307contains the address of a structure in memory for a new control registerand other pertinent values which are loaded into the registers of DMAchannel 21 such as: source address register, source index register,destination address register, destination index register, link pointerregister and auxiliary registers if using split-mode operation. Itshould be noted that autoinitialization of the DMA channel occurswithout intervention by CPU 12.

TABLE 6 The effect of the TRANSFER MODE field. TRANSFER MODE Effect 00Transfers are not terminated by the transfer counter and no autoinitial-ization is performed. TCINT can still be used to cause an interrupt whenthe transfer counter makes a transition to zero. The DMA channelcontinues to run. 01 Transfers are terminated by the transfer counter.No autoinitialization is performed. A halt code of 10 is placed in theSTART field. 10 Autoinitialization is performed when the transfercounter goes to zero without waiting for CPU intervention. 11 The DMAchannel is autoinitialized when the CPU restarts the DMA using the DMAregister in the CPU. When the transfer counter goes to zero, operationis halted until the CPU starts the DMA using the DMA start field in theCPU DMA register and a halt code of 10 is placed in the start field bythe DMA.

In the preferred embodiment, any one of the six DMA channels can operatein conjunction with any one of the six communication ports 50-55 using aspecial DMA transfer mode called split-mode operation as shown in FIG.11. Split-mode operation separates one DMA channel into two concurrentoperations: one dedicated to receiving data from a communication portand writing the data to a location in the memory map, and one dedicatedto reading data from a location in the memory map and writing the datato a communication port. The control register 300 has a SPLIT MODE bitthat can be set to indicate split mode operation and COM PORT bits toselect which communication port is used for split-mode operation (referto Table 4 register bit 14). During split-mode operation, the DMAchannel dedicated to reading data operates independently from the DMAchannel dedicated to writing data. Thus, an auxiliary count register andan auxiliary pointer register for the DMA channel are dedicated towriting data (auxiliary channel) and respectively correspond to transfercount registers and link pointer registers used for the DMA channeldedicated to reading data (primary channel). It should be noted thatthere are six auxiliary count registers and six auxiliary pointerregisters—one for each DMA channel.

In the preferred embodiment, as many as six DMA channels are accessingthe DMA bus 38 at the same time (and sometimes as much as twelve DMAchannels are accessing the DMA bus 38 simultaneously which occurs whenoperating in split-mode when all six DMA channels are configured tooperate in conjunction with all six communication ports). Thus,contained within coprocessor 22 is a priority controller (not shown)that implements a rotating priority scheme. The last DMA channel to getservice becomes the lowest priority DMA channel. The other DMA channelsrotate through a priority list with the next lower DMA channel from theDMA channel serviced having the highest priority on the followingrequest. The priority rotates every time the most recentpriority-granted channel completes its access. FIG. 12a illustrates therotation of priority across several DMA coprocessor accesses. Anasterisk indicates the DMA channel requesting service. When a DMAchannel is running in split-mode the arbitration between channels issimilar to the just discussed unified DMA channel. The split-mode DMAchannel participates in the rotating priority scheme having the samepriority as if it were a unified DMA channel.

The split-mode DMA channel complicates the process by having a primarychannel transfer and an auxiliary channel transfer. Since primary andauxiliary channels can run independent of each other, the twosubchannels compete for priority within the host DMA channel while thehost DMA channel competes with the other unified DMA channels. FIG. 12billustrates this priority mechanism that is controlled by the prioritycontroller (not shown) contained within coprocessor 22. In this caseassume that only channel two is running in split-mode. The primarychannel is designated as 2 pri and the auxiliary channel as 2 aux.Again, an asterisk (*) indicates the DMA channel requesting service. Thefirst service is a request by 2 pri. After 2 pri is serviced, channel 2is moved to the lowest priority level, and 2 pri is moved to a lowerpriority level below 2 aux within channel 2. It should be noted that thetwo subchannels (2 pri and 2 aux) are prioritized within themselves.Channel 4 having a higher priority than channel 2 is serviced next. Onthe third service 2 pri is serviced. On the 4th service, with 2 aux and2 pri both requesting, 2 aux is serviced first, channel two becomes thelowest priority channel and 2 aux becomes lower priority than 2 pri. Onthe 5th service channel 3 is serviced. If no higher priority servicesare requested, 2 pri would be serviced next.

As is evident from this description, DMA coprocessor 22 is thus operableto transfer the contents of memory locations from memory beginning withthe initial source address, to memory locations beginning with thedestination address. After completion of the transfers, the DMAcoprocessor can autoinitialize itself by fetching from memory thenecessary information to perform another DMA transfer sequence. Thisoperation as described herein does not require the intervention of CPU12 and, since DMA bus 38 provides a separate address and data path forDMA purposes, can allow such a DMA operation to take placesimultaneously with program and data accesses in the normal operation ofmicrocomputer 10. DMA operations can occur essentially transparent tothe operation of microcomputer 10, greatly enhancing its performance.

Referring now to FIG. 13, the operation of peripheral bus 28, and itscommunication with various peripheral functions will be explained. Byway of example, timer 40 and 41, analysis module 42 and communicationports 50-55 are the peripheral functions connected to microcomputer 10described herein. These three functions provide certain communicationand/or data processing functions depending upon their construction, buteach of said peripheral functions communicate with peripheral bus 28,and thereby with the rest of microcomputer 10, in the same manner. Eachof peripherals 40, 41, 42 and 50-55 are configured and operated bymicrocomputer 10 by using memory mapped registers, addressable byperipheral bus 28, in the manner described below. It should be recalledthat, as in the case of the memory-mapped registers contained within DMAcontroller 22, the memory-mapped registers contained in the peripheralfunctions described below reside in the input/output address space000100000_(h) through 0001000FF_(h). The preferred embodiment ofmicrocomputer 10 consists of two timers; each timer operatesindependently of the other. Thus only timer 40 will be described indetail herein below because timer 41 has similar functions as timer 40and also that the registers of timer 41 corresponds to those registersof timer 40. For example, timer logic 400 corresponds with timer logic410, control register 402 corresponds with control register 412, periodregister 404 with period register 414, counter register 406 with counterregister 416, and TCLK1 with TCLK2.

Timer 40 performs the function of measuring predetermined time periodsfor external control, or for internal control of microcomputer 10. Timer40 contains timer logic 400, connected to address lines 28 a ofperipheral bus 28; timer logic 400 is operable to evaluate the addresssignal on lines 28 a of peripheral bus 28, and to allow access to thevarious memory-mapped registers within timer 40 accordingly. Each of theregisters within timer 40 (described below) are addressable by anaddress signal within the single address space of microcomputer 10. Thememory-mapped registers within timer 40 include a control register 402which contains certain control information necessary to control theoperation of timer 40, such as an enable/disable bit, and such aswhether timer 40 is controlled by the system clock of microcomputer 10to provide an external output, or is controlled by external clock pulsesto provide an internal signal. Timer 40 further contains addressableperiod register 404, which is loaded from data lines 28 d with the valuespecifying the period of time to be measured by timer 40. Counterregister 406 is also contained within timer 40, and which is incrementedby each pulse of either the system clock or a clock pulse received online TCLK1 externally. In operation, timer logic 400 is responsive tothe contents of counter register 406 equaling the contents of periodregister 404, at which time timer logic 400 generates an internalinterrupt signal to controller 14 if control register 402 has so chosen;if control register 402 has selected external output, timer logic 400generates a pulse on line TCLK1 when the contents of counter register406 equal the contents of period register 404.

Analysis module 42 is to provide improved emulation, simulation andtestability architectures and methods which provide visibility andcontrol without physical probing or special test fixtures. One suchanalysis module is described in co-pending and co-assigned U.S.application Ser. No. 388,270 filed Jul. 31, 1989. Some featuressupported by analysis module 42 are specifically discussed below. Atrace feature enables tracing of the start address of the previousprogram block, end address of the previous program block, and startaddress of current block, with current program counter (PC) equal to theend address of the current block. This facilitates a reverse assembly ofwhere the program has come from and allows a trace back feature to beimplemented in combination with the PC context switch breakpoints.

Sufficient machine state information is implemented to retrieve the lastprogram counter executed and to determine if any repeat single, repeatblock, or delayed instruction is active. The machine state informationalso recalls the machine states required to restart execution from thesecases in any of the CPU stop modes. A stop may occur within repeats.Single stepping of the code results in a single instruction beingexecuted. This means only one instruction within a repeat single orblock loop is executed.

Faster downloads are supported by implementing short scan paths in theCPU. Short scan paths are accomplished using a partial scan of the CPUand a HLT applied to the CPU MPSD test port.

The behavior of the memory interface differs during emulation mode andsimulation mode. In emulation mode, control of the memory interfaceallows normal operation of the interface to continue while the CPUdomain test port is in a scan, pause or halt state. Control signalsremain inactive in a high impedance state while Hold functions continueto operate. Memory control signals are to be asserted in the inactivestate with correct timing when the system domain test port is in a pausestate or scan state. Control signals cannot toggle or glitch because ofMPSD test port code changes. In simulation mode, control of theinterfaces are such that the control signals are asserted in the machinestate with correct timing when the system domain test port is in a SDAT,SCTRL, or PAUS state. Memory interface logic (hold_, holda) do notfunction unless the system test port is in the CNTRL or FUNC state andsuspend is not active. Simulation mode slaves system domain clock to theCPU domain execution clock, MPSD codes FUNC, CNTRL, or HLT applied.

Peripherals have independence of operation when the chip is operating inthe emulation mode. In simulation mode their operation is tightlycoupled to the CPU domain. The peripherals may have from one to three ofthe following operating modes when the chip is operating in theemulation mode: free, soft and hard. When a peripheral, such as a timer,is allowed to have up to three modes, the specific mode is madeavailable to the user through two dedicated bits in a peripheral controlregister. These bits do not affect the operation of the peripheralsprovided the system test port has FUNC applied.

Peripheral free mode means the peripheral continues to operate normallyregardless of the CPU domain state or the state of SUSPEND provided thesystem test port has CNTRL applied.

Peripheral soft allows the coupling of a CPU or system assertion ofSUSPEND i.e., CPU domain halted, with the subsequent halt of theperipheral. With peripheral soft, the peripheral continues to operatenormally after SUSPEND is asserted until a predefined condition withinthe peripheral occurs. When this event occurs the peripheral haltsexecution. The peripheral resumes execution when SUSPEND becomesinactive and the system test port has CNTRL applied.

Peripheral hard allows the direct coupling of a CPU or system assertionof SUSPEND i.e., CPU domain halted, with an immediate halt of theperipheral. With peripheral hard, the peripheral appears as if it istightly coupled to the CPU domain, halting immediately when SUSPEND isasserted. This assumes the system test port has CNTRL applied. When thisoccurs the peripheral halts execution. The peripheral resumes executionwhen SUSPEND becomes inactive and the system test port has CNTRLapplied. This mode makes the peripheral execute the same number ofclocks of user code as the CPU domain executes.

Peripheral operation in the Simulation Mode is controlled by the Systemtest port, suspend, and the CPU test port. The peripheral clocks may runwhen, the CPU domain and the System domain test ports have CNTRL appliedand the CPU clocks are on, and SUSPEND is not active.

Five instructions are used in the emulation architecture to manageanalysis and emulation requested stops. These instructions are:

a) ESTOP Emulation Stop b) ETRAP Emulation Trap c) ASTOP Analysis Stopd) ATRAP Analysis Trap e) ERET Emulation Return

These instructions provide the mechanism where by Emulation SW andAnalysis generated execution halt requests are processed in conjunctionwith TRAPEN, allowing the determination of the cause of the trap orstop. The emulation return instruction is separate from a normal returnas the two trap instructions set a suspend bit (TRPSUSP) and theemulation return instruction resets this bit. The emulation and analysistraps and returns are identical normal traps and returns with theexception of managing TRPSUSP.

Emulation stop (ESTOP) is placed in memory by the Emulation SW orimbedded in the functional code by the user or compiler. It causes astop with the pipeline empty regardless of the CPU stop mode. Executionof this instruction causes an associated emulation interrupt. An ESTOPstatus is set in the CPU and instruction fetches to fill the pipeline donot occur until this flag is reset by Emulation SW. The pipeline may beloaded with a non empty state while this flag is set and the pipelineexecutes to the empty state when CPU test port codes HLT, or CNTRL areapplied. FUNC causes this flag to be reset.

Emulation trap (ETRAP) is placed in memory by the Emulation SW orimbedded in the functional code by the user or compiler. If TRAPEN istrue to the CPU, this instruction causes a trap, sets TRPSUSP, andgenerates an associated emulation interrupt. The pipeline is emptybehind it. When TRAPEN is not true to the CPU, the instruction isexecuted, the emulation interrupt generated, but TRPSUSP is not set andthe trap is not taken. In both cases an ETRAP status flag is set in theanalysis domain. This bit is resetable by scan.

Analysis stop (ASTOP) is jammed into the instruction pipeline at theearliest time when the analysis requests a stop condition and TRAPEN isfalse to the CPU. ASTOP has the same characteristics as ESTOP except ithas its own status flag which has the same characteristics as the ESTOPstatus flag.

Analysis trap (ATRAP) is jammed into the instruction pipeline at theearliest time when the analysis requests a stop condition and TRAPEN istrue to the CPU. This instruction causes a trap, sets TRPSUSP, andgenerates an associated emulation interrupt. The pipeline is emptybehind it. An ATRAP status flag is set in the analysis domain. This bitis resetable by scan.

Emulation return (ERET) resets TRPSUSP and otherwise acts like a normalreturn instruction.

Message status register contains status information for controlling thetransfer of data and commands to and from the device. These status bitsare readable and some are writable.

The status bits are: Bit Number a) WBFUL-write buffer full 4 b)RBFUL-read buffer full 3 c) CMD-Command transfer 2 d) GXFER-Goodtransfer 1 e) MACK-Message acknowledge 0

ABUSACT indicates that the analysis test port has HLT, CNTRL, or FUNCapplied.

The WBFUL status bit is in the analysis domain. It is set via a devicewrite to the message register when the RBFUL flag is not true andABUSACT is true. This bit is reset via scan.

The RBFUL status bit is in the analysis domain. It is set via scan andreset via a read to the CMD address of the MSG register when CMD is setor a read to the data address of the MSG register when CMD is not setprovided ABUSACT is true in both read instances.

The CMD status bit is in the analysis domain. It is set via a devicewrite to the command message register address, when the RBFUL flag isnot true and ABUSACT is true. It is reset when a write occurs to thedata message register address and the RBFUL flag is not true and ABUSACTis true. The CMD bit scanable and settable to either logical value.

The GXFER status bit is in the system domain. It is set when:

a) A read to the command message address occurs, CMD is true, RDRUL istrue, and ABUSACT is true;

b) A read to the data message address occurs, CMD is false, RDFUL istrue, and ABUSACT is true;

c) A write to a data or command message address occurs, RBFUL is false,and ABUSACT is true.

The GXFER bit is reset on system FUNC or a read or write to a messageregister address without a, b, or c being true.

Message acknowledge (MACK) is a writable and readable bit connected tothe emulation control block and resides in the system domain. The MACKbit is selectable to appear on EMUO pin and it serves as the handshakingfor message transfers.

The message passing register and message register status bits in theanalysis domain are on a short analysis scan path. The short analysisscan path is the first path out of the analysis domain. The messageregister is the first output followed by the message status registerbits. It should be noted that both the message passing register and themessage register status bits are transferred out in an order startingwith the least significant bit (LSB).

In one variation of the preferred embodiment another microcomputersimilar to the microcomputer 10 herein-described is directly coupled tomicrocomputer 10 via one or more or all of the communication ports50-55. FIG. 14 illustrates the connection between two microcomputers 10where one communication port is connected to the other communicationport via control and data signals 585. When two microcomputers 10 arecoupled via the communication ports, the input and output FIFO registersare combined and thus the number of FIFO registers is doubled. Thebuffering capacity of the combined communication port is the sum of eachindividual communication port. The two coupled microcomputers 10 haveprovisions for pin for pin compatibility enabling the two microcomputersto directly connect via any one of the six communication ports 50-55. Itshould be noted that with pin for pin compatibility betweenmicrocomputers 10, the microcomputers are readily connected using thecommunication ports.

Referring now to FIG. 15, the operation of communication ports 50-55will be explained. FIG. 15 shows the internal architecture ofcommunication port 50, which for purpose of this discussion isfunctionally identical to the other five communication ports. In orderfor data transfer to occur with communication ports 50-55, the desiredaddress presented via peripheral bus 28 is made to correspond to a valuewithin the memory address space of microcomputer 10 that corresponds toan address serviced by peripheral port 25. The memory-mapped registerswithin communication ports 50-55 which are described below are withinthe memory address space 000100040_(h) through 00010009F_(h).

Communication port 50 contains port control register 510, inputfirst-in-first-out (FIFO) 540, and output FIFO 550, each of which areconnected to address lines 28 a and data lines 28 d of peripheral bus28, and each of which are mapped into corresponding address locations ofthe memory address space of microcomputer 10. The input FIFO 540 and theoutput FIFO 550 each have a corresponding FIFO control that is attachedto the respective FIFO unit. Communication port 50 further contains aninterface port 530. A port arbitration unit 520 provides handshakingsignals to an external device for effectuating data transfers from or tointerface port 530. The port control register 510 contain control andstatus bits for the communication channel. Port logic unit 560 controlthe interfacing between to the port arbitration unit 520, input andoutput FIFO units 540 and 550 and the port control register 510. Theport logic unit 560 also provides interrupts to the interrupt logic 250.

In order to transmit data, a qualifying token is used for data flowcontrol of the connected communication port. For example, a signal online BUSRQ from port logic unit 560 to port arbitration unit 520 signalsthe port arbitration unit 520 to arbitrate for control over theeight-bit communication channel data bus CD(7-0) from external requestto use the data bus. It should be noted that arbitrating is notnecessary if port arbitration 520 has possession of the qualifyingtoken. The qualifying token is used to determine whether communicationport 50 or an external port has control of the communication channeldata bus. The qualifying token is passed between the port arbitrationunit 520 of communication port 50 and the external port. The portarbitration unit 520 is a state machine having four defined states.Table 7 defines these states.

TABLE 7 Definition of PAU states PAU STATE PAU Status 00 PAU has token(PORT DIR = 0) and channel not in use OUTPUT LEVEL = 0). 01 PAU does nothave token (PORT DIR = 1) and token not requested by PAU (OUTPUT LEVEL =0). 10 PAU has token (PORT DIR = 0), channel in use (OUTPUT LEVEL not =0). 11 PAU does not have token (PORT DIR = 1), token requested by PAU(OUTPUT LEVEL not = 0).

These four states aid in determining whether or not the token can bepassed to the requesting communication port and are defined in terms ofstatus information that is available in the port control register 510.FIG. 16 shows the state diagram and controlling equations for the statetransitions of the port arbitration unit 520.

For this example, communication port 50 is connected to an external portsimilarly equipped as shown in FIG. 14. Operation begins with portarbitration unit 520 of communication port 50 in state 00 (with token,channel not in use) connected to a port arbitration unit of the externalport in state 01 (without token, token not requested). Communicationport 50 is instructed to transmit data to the external port. Portarbitration unit 520 receives a request from port logic unit 560 on lineBUSRQ to use the communication port data bus. Port arbitration unit 520allows the output FIFO to transmit one word immediately, since it hasthe token, and enters state 10 (with token, channel in use). After theoutput FIFO transmits that one word, port logic unit 560 removes the busrequest (BUSRQ=0) and then port arbitration unit 520 returns to state00.

Next port arbitration unit of external port receives a request from itsport logic unit to use the bus (BUSRQ), port arbitration unit of theexternal port requests the token from port arbitration unit 520 over theCREQ_ line, state 11, (without token, token requested). This request isseen inside state machine 525 of port arbitration unit 520 via the statevariable TOKRQ. When port arbitration unit 520 is in state 00 (withtoken, channel not in use) the token is transferred using the CACK_line. When port arbitration unit of the external port receives the bus,this is signalled internally within the port arbitration by a busacknowledge signal (BUSACK). As a result of the token transfer portarbitration unit 520 enters state 01 (without token, token notrequested) and port arbitration unit of the external port enters state10 (with token channel in use). It should be noted that communicationport 50 is not limited to communications with external ports similarlyequipped but can interface to external ports that provide properhandshaking signals.

Since port arbitration unit 520 always returns to state 00 aftertransmitting a single word, tokens may be passed back and forth allowingfor a word to be transmitted from communication port 50 and the externalport and then from the external port to communication port 50. Thisprovides an inherently fair means of bus arbitration by not allowing anyone output FIFO from continually monopolizing the communication data busthus, preventing the other output FIFO module from being continuallyblocked. In other words, commensurate loading of the FIFOs isaccomplished. If an input FIFO becomes full, a signal INW is sent toport arbitration unit 520 which causes I/O port 531 not to bring CRDY_low because at the start of the next transmission the first incomingeight-bits will overflow the input FIFO and data will be lost.

Another feature incorporated into the communication ports is the abilityeffectuate input and output FIFO halting. Input and output FIFO haltingis the ability to prevent additional transfers from and to the outputand input FIFOs respectively. During system development, debugging anduse, the ability to stop an input and output FIFO without the loss ofany data that is being sent or received is a very desirable feature. Inthe preferred embodiment, after a transfer of a word via thecommunication channel bus the port arbitration unit 520 returns to state00, by setting either the input channel halt (ICH=1) or the outputchannel halt (OCH=1) in the port control register 510, port logic unitin turn sends signal HOLDTOK to port arbitration unit 520. Portarbitration unit 520 has a couple of options after receipt of theHOLDTOK signal. It having possession of the token refuses to relinquishthe qualifying token thus preventing data from entering input FIFO 540via the communication channel bus or it refuses to arbitrate for thequalifying token, thus successfully stopping output FIFO 550 fromtransmitting data via the communication channel bus.

For example, input FIFO 540 of communication port 50 (connected toexternal port) has ICH=1. Then the input FIFO 540 is halted based uponthe communication channel's current state. The input channel is unhaltedwhen ICH=0. When the input FIFO 540 of communication port 50 is unhalted(ICH=0) communication port 50 releases the qualifying token ifrequested.

Output FIFO halting is analogous to input FIFO halting. For example,output FIFO 550 of communication port 50 (connected to external port)has OCH=1. Then the output FIFO 550 is halted based upon its currentstate. If communication port 50 does not have the qualifying token,output FIFO 550 is halted by communication port 50 not requesting thequalifying token. If the communication port 50 has the qualifying tokenand is currently transmitting a word, then after the transmission iscomplete, no new transfers will be initiated.

Following the FIFO halting rules discussed above, other possiblescenarios of the preferred embodiment include: 1) communication port 50has the qualifying token, input FIFO 540 is not halted, and output FIFO550 is halted, then it will transfer the token when requested by theexternal port; 2) communication port 50 has the qualifying token, inputFIFO 540 is halted, and output FIFO 550 is halted, then it will nottransfer the token when requested by the external port; 3) coming out ofa halted state, if the communication port 50 has the token it maytransmit data if necessary, if it needs the token, it will arbitrate forthe token as described herein-above.

FIG. 15 further shows port logic unit 560 with interrupt signals OCRDY(output channel ready), ICRDY (input channel ready), ICFULL (inputchannel full), and OCEMPTY (output channel empty) that are connected tointerrupt logic 250. Port logic unit 560 generates those interruptsbased upon signals on line input level and output level from input FIFO540 and output FIFO 550 respectively. But information (PINF) from portarbitration unit 520 and FIFO information from the FIFO registers arefed to port logic unit 560 which supplies port arbitration register 510input channel level, output channel level and port directioninformation.

The communication ports support three principle modes ofsynchronization: a ready/not ready signal that can halt CPU and DMAaccesses to a communication port; interrupts that can be used to signalthe CPU and DMA; status flags in the communication port control registerwhich can be polled by the CPU.

The most basic synchronization mechanism is based on a ready/not readysignal. If the DMA or CPU attempt to read an empty input FIFO, a notready signal is returned and the DMA or CPU will continue the read untila ready signal is received. The ready signal for the output channel isthe OCRDY (output channel ready) which is also an interrupt signal. Theready signal for the input channel is ICRDY (input channel ready) whichis also an interrupt signal.

Interrupts are often a useful form of synchronization. Eachcommunication port generates four different interrupt signals: ICRDY(input channel ready), ICFULL (input channel full), OCRDY (outputchannel ready) and OCEMPTY (output channel empty). The CPU responds toany of these four interrupt signals. The DMA coprocessor responds to theICRDY and OCRDY interrupt signals.

The third mode of synchronization that can be employed in the preferredembodiment is CPU polling. The CPU can be setup to poll the status flagsin communication port control registers at predetermined intervals oroccurrences during the operation of the data processing device.

In addition to the communication ports 50-55, the preferred embodimentincorporates a special split mode DMA capability that transforms one DMAchannel into two DMA channels, one dedicated to receiving data from acommunication port and writing it to a location in the memory map, andone dedicated to reading data from a location in the memory map andwriting it to a communication port. All six DMA channels can support anyof the six communication ports.

In the present embodiment data words are thirty-two bits wide, howeverinterface port 530 has a bus eight-bits wide; thus, interface port 530adjusts for the disparity by having an I/O port 531, an input and outputdata shifter 533, a multiplexer 536 and a thirty-two bit buffer register539. For example, to receive incoming data from the external port, asignal CSTRB_ precedes the data signaling communication port 50 thepresence of valid data on bus CD(7-0). Of course, external port haspossession of the qualifying token thus allowing it to transmit data.The incoming data is received by I/O port 531 where data shifter 533shifts the received data via multiplexer 536 to the proper packetlocation within the thirty-two bit buffer register 539. After I/O port531 receives data from bus CD(7-0), it sends signal CRDY_ to confirm thereceipt of data from the external port. Since bus CD(7-0) is eight-bitswide, a data word is divided into four consecutive eight-bit packets tomake up the thirty-two bit word used in the preferred embodiment. Whenfour packets of eight-bits of data are placed in buffer register 539,port arbitration unit 520 sends signal SAVEFIF to FIFO control of inputFIFO 540, and the contents of the buffer register 539 is stored to inputFIFO 540, where the data is accessed via peripheral bus 28 as describedherein-above.

To transmit data to the external port, output FIFO 550 receivesthirty-two bit data words from peripheral bus 28 d. Port arbitrationunit 520 sends signal LOADBUF to FIFO control of output FIFO 550 and thecontents of output FIFO 550 is transferred to buffer register 539.Multiplexer 536 selects eight-bit packets that are shifted using datashifter 533 via I/O port 531 onto the eight-bit communication busCD(7-0). It should be noted that possession of the qualifying token byport arbitration unit 520 is implied to transmit data as describedabove. Communication port 50 signals valid data with CSTRB_ via I/O port531. Data is transferred via eight-bit bus CD(7-0). The external portreceiving the data from bus CD(7-0) signals the transmittingcommunication port 50 with CDRDY_ thereby acknowledging data is receivedcompleting a packet transfer. Three other packets are transferred tocomplete the thirty-two bit data word.

FIG. 18a illustrates the timing for a token transfer sequence betweentwo communication ports, A and B. FIG. 18b continues the timing diagramto illustrate a word transfer sequence followed by the start of anotherword transfer sequence. In order to accurately describe the timing ofthe operation of the communication ports, it is important todifferentiate between the internal signals applied to the pins and theexternal status seen at the interface between the communication ports.Referring to FIG. 17, internal signals applied to a buffer with a suffix‘a’ depicts processor A and ‘b’ depicts processor B. The external signalbetween the two connected communication ports is denoted by aconcatenation of ‘a’ and ‘b.’ The value that a processor sees bysampling the output pad is denoted with a single right quote (′). Allsignals are buffered and can be placed in a high impedance state. ClocksH1 and H3 are generated within the clock generator circuit 200 and areused to synchronize communication port transfers.

The numbers shown on FIGS. 18a and 18 b correspond to the numbers in thefollowing description. Each number describes the events occurring thatcorrespond to an instant represented by the corresponding number on thetiming diagrams shown in FIGS. 18a and 18 b. It should be noted thatnegative true signals are represented with a bar above the signal inFIGS. 18a and 18 b while an underscore after the signal is used in thefollowing description. Also the signal CST of FIGS. 18a and 18 b isequivalent to the signal CSTRB in the herein description.

Referring to FIG. 18a, a token request and token transfer sequenceproceeds as follows:

1—B requests the token by bringing CREQb_ low.

2—A sees the token request when CREQa′_ goes low

3—A acknowledges the request, after a type 1 delay from CREQa′_ falling,by bringing CACKa_ low.

4—B sees the acknowledge from A when CACKb′_ goes low.

5—A switches CRDYa_ from tristate to high on the first H1 rising afterCACKa_ falling.

6—A tristates CDa(7-0) on the first H1 rising after CACKa_ falling.

7—B switches CSTRBb_ from tristate to high after a type 2 delay fromCACKb′_ falling.

8—B brings CREQb_ high after a type 1 delay from CACKb′_ falling.

9—A sees CREQa′_ go high.

10—A brings CACKa_ high after CREQa′_ goes high.

11—A tristates CSTRBa_ after CREQa_ goes high.

12—A tristates CACKa_ after CREQa′_ goes high and after CACKa_ goeshigh.

13—A switches CREQa_ from tristate to high after CREQa′_ goes high.

14—B tristates CREQb_ after CREQb_ goes high.

15—B switches CACKb_ from tristate to high after CREQb_ goes high.

16—B tristates CRDYb_ on the H1 rising after CREQb_ goes high.

17—B drives the first byte onto CDb(7-0) on the H1 rising after CREQb_goes high.

18—A sees the first byte on CDa′(7-0).

19—B brings CSTRBb_ low on the second H1 rising after CREQb_ rising.

20—A sees CSTRBa′_ go low, signalling valid data.

21—A reads the data and brings CRDYa_ low.

22—B sees CRDYb′_ go low, signalling data has been read.

23—B drives the second byte on CDb(7-0) after CRDYb′_ goes

24—A sees the second byte on CDa′(7-0).

25—B brings CSTRBb_ high after CRDYb′_ goes low.

26—A sees CSTRBa′_ go high.

27—A brings CRDYa_ high after CSTRBa′_ goes high.

28—B sees CRDYb′_ go high.

29—B brings CSTRBb_ low after CRDYb′_ goes high.

30—A sees CSTRBa′_ go low, signalling valid data.

31—A reads the data and brings CRDYa_ low.

32—B sees CRDYb′_ go low, signalling data has been read.

33—B drives the third byte on CDb(7-0) after CRDYb′_ goes low.

34—A sees the third byte on CDa(7-0).

35—B brings CSTRBb_ high after CRDYb′_ goes low.

36—A sees CSTRBa′_ go high.

The following events are used in FIG. 18b illustrating the timing forthe word transfer between communication ports A and B. It should benoted that the events described above also apply to the timing betweencommunication ports A and B shown in FIG. 18b.

36—A sees CSTRBa′_ go high.

37—A brings CRDYa_ high after CSTRBa′_ goes high.

38—B sees CRDYb′_ go high.

39—B brings CSTRBb_ low after CRDYb′_ goes high.

40—A sees CSTRBa′_ go low, signalling valid data.

41—A reads the data and brings CRDYa_ low.

42—B sees CRDYb′_ go low, signalling data has been read.

43—B drives the fourth byte on CDb(7-0) after CRDYb′_ goes

44—A sees the fourth byte on CDa(7-0).

45—B brings CSTRBb_ high after CRDYb′_ goes low.

46—A sees CSTRBa′_ go high.

47—A brings CRDYa_ high after CSTRBa′_ goes high.

48—B sees CRDYb′_ go high.

49—B brings CSTRBb_ low after CRDYb′_ goes high.

50—A sees CSTRBa′_ go low, signalling valid data.

51—A reads the data and brings CRDYa_ low.

52—B sees CRDYb′_ go low, signalling data has been read.

53—B brings CSTRBb_ high after CRDYb′_ goes low.

54—A sees CSTRBa′_go high.

55—A brings CRDYa_ high after CSTRBa′_ goes high.

56—B sees CRDYb′_ go high.

57—B drives the first byte of the next word onto CDb(7-0) after a type 1synchronizer delay from CRDYb′_ falling (52).

58—A sees the first byte of the next word on CDa(7-0).

59—B lowers CSTRBb_ after a type two delay from CRDYb′_ falling.

FIG. 19 shows an embodiment of a stand alone configuration of theimproved data processing configured to show connections to a pluralityof memories 350 and 351 and peripheral devices 360 and 361. Globalperipheral port 24 and local peripheral port 26 provide the interface tothe external devices. For example, bus 380 can be used for programaccesses and bus 390 can be used for data or I/O accesses which allowsfor simultaneous external program and data accesses. Microcomputer 10also has available six communication channels capable of interfacing toother systems in I/O intensive applications. Peripherals and otherexternal devices such as key boards, monitors, disk drives, printers,displays, transducers, modems, processors, local area networks (LANs),and other known or hereafter devised with which the system commends itsuse can be connected to the peripheral ports 24 and 26 and communicationports 50-55.

FIGS. 31-43 show embodiments of various parallel processing systemarchitecture configurations which are possible with plurality ofimproved data processing device of this preferred embodiment withexternal memory.

For example, FIG. 20 specifically shows parallel processing systemarchitecture with external memory in the form of building blocks wherememories 350 and 351 can be interfaced via bus 380 and bus 390 andcommunication ports for communication to additional data processingdevices of this preferred embodiment and comparable like communicationports. Alternatively as shown in FIG. 21, the parallel system buildingblock can be another microcomputer 10 effectuating communication viacommunication ports 50-55 and peripheral ports. The flexibility in themultitude of connections possible with microcomputer 10 offers a vastvariety of systems.

One possible system shown in FIG. 22 is a pipelined linear array usingthree microcomputers 10 connected in a serial configuration. Anothersystem is shown in FIG. 23 where a bi-directional ring utilizing aplurality of microcomputers 10 are connected with more than onecommunication port between two of the microcomputers 10 thus increasingthe communication bandwidth between those two microcomputers.

The parallel processing system architecture of FIG. 24 is arranged inthe form of a tree. Again the communication ports are used to connectbetween the trunks and branches and between parent and children and evenmore architectures are possible by variants of the illustration in FIG.24.

FIG. 25 illustrates how communication ports support a variety of twodimensional structures where a two-dimensional mesh is constructed usingonly four of the communication ports and nine microcomputers 10. Atwo-dimensional structure of hexagonal mesh and even higher dimensionalstructures are also supported as shown in FIG. 26.

FIG. 27 shows a three dimensional grid supported by six communicationports. The microcomputer 10 in the center has all six communicationports connected to six other microcomputers 10 each using only onecommunication port and having rest of the five communication ports ineach unit available for further expansion of this three dimensional gridor extra memory or other like uses. Even higher dimensional structure inthe form of a four dimensional hypercube is also possible as shown inFIG. 28. Other higher dimensional structures are also possible to theperson of ordinary skill in the art.

A variation of the parallel processing system architecture configurationis illustrated in FIG. 29 where combinations of shared memories 350 and351 and microcomputer-to-microcomputer communication are possible. FIG.30 illustrates a parallel system where each microcomputer 10 has localmemory that can be shared between other microcomputers 10 viacommunication ports.

A system application having private local memories 340, 341, and 342 anda shared global memory 350 is illustrated in FIG. 31. Global memory 350is attached to external bus 380 while local memories 340, 341, and 342private to each microcomputer 10 are attached to auxiliary bus 390.Another variation is illustrated in FIG. 32 where microcomputers 10share global memories 350 and 351 via external bus 380 and auxiliary bus390.

FIG. 33 illustrates a parallel processing system where some remotemicrocomputers 10 are connected via modem link 450, 451, 452 and 453 totheir respective communication ports 50-55 while other localmicrocomputers 10 are connected directly via communication ports 50-55.Keyboard 460, display assembly 461 and mass data media 465 are connectedto local microcomputer 10 via communication ports.

The flexibility from the various communication port connections andmemory sharing capabilities of microcomputers 10 provide systems thatcan be optimized for applications using a single microcomputer 10 ormultiple microcomputers 10. One possible system is in the field ofrobotics as shown in FIG. 34. Using microcomputer 10 as the buildingblock, the interactive interfacing required for the varies functions ofa robot 900 is accomplished. For example, robot 900 equipped with visionrecognition from sensor assembly 910 makes contact with an item out ofits reach. Signals 915 are sent to control logic 920 which supplysignals to control the operation of computation system 930 consisting ofplurality of parallel processing microcomputers 10. System 930 receivesprogram instructions from program memory 940. Data memory 950 providesdata storage for system 930. Command signals from system 930 aregenerated and transformed from digital to analog signals using D/A 955to control motors 960 for moving the various joints of robot 900. Analogsignals 958 provide the motor controls. While motors 960 are receivingcontrol signals, motors 960 are also providing feed back analog signals948 which are converted to digital signals via A/D converter 945. Thecomputation system 930 utilizing the feed back signals 948 from motors960 determines new motor control signals to be sent to motors 960insuring effective movement of robot 900. Additionally, as the robotmoves, vision recognition control relays distance and directioninformation back to control logic 920. Other functions of robot 900 suchas speech synthesis via speakers 912 and speech recognition from sensorassembly 910 also has a high degree of interactivness that system 900 iscapable to accommodate. As more and more functions and requirements ofthe system develop, additional microcomputers 10 can be readilyconnected to system 900.

Applications that utilize complex algorithms are well suited for theherein-described preferred embodiments. Such applications includespeech-recognition technology, cellular radio phones, videoteleconferencing, and multiplexing four voice conversations on leased64-Kbit/s lines that formerly could carry only one. A large number ofother computationally-intensive problems are well-suited for parallelprocessing, such as 3D graphics, control, array processors, neuralnetworks, and numerous other applications listed in the coassignedapplications incorporated herein by reference.

Systems that have interactions with its components and other systemsbenefit from the parallel processing system architecture configurationof microcomputer 10. Microcomputers 10 can be built upon to suit theneeds of a system as system requirements grow. With the manycommunication ports, commands and interactive signals can be directed tothe proper microcomputer 10 or multiple of microcomputers 10 to respondto those commands and interactive signals.

FIG. 35 shows the circuit diagram for the multiplexing data for four newthree-operand instructions as well as other instructions. The variousmodes include (109) 8-bit immediate (short immediate), integer immediate(signed and unsigned), floating point immediate, direct, indirect, andlong immediate. Short immediate and indirect (integer and floatingpoint) are used by the four new three-operand instructions. Themultiplexer for register mode is contained in the register file.

FIG. 36a illustrates the circuit diagram used to count the threeinstructions fetched after a delayed instruction, including delayed trap(LAT) and delayed Repeat Block (APTBO). The counter is reset by (DLYBR)whenever a delayed instruction is decoded. The counter counts every timethe Program Counter is updated. By keeping track of the program counterupdates, wait states are inserted due to pipeline conflicts. Pipelineconflicts occur when a task takes more than one system clock cycle tocomplete.

FIG. 36b illustrates a circuit with an incrementer used for the delayedtrap instruction. When the fetch of the third instruction after adelayed trap begins, the program counter (PC) is located with the trapvector. PC+4 needs to be stored in PC+4 register 210 since the programneeds to return to PC+4. The PC is at PC+3 and the incrementer shown inFIG. 36b increments to PC+4 before being stored in stock memory.

Although the invention has been described in detail herein withreference to its preferred embodiment, it is to be understood that thisdescription is by way of example only, and is not to be construed in alimiting sense. It is to be further understood that numerous changes inthe details of the embodiments of the invention, and additionalembodiments of the invention, will be apparent to, and may be made by,persons of ordinary skill in the art having reference to thisdescription. It is contemplated that such changes and additionalembodiments are within the spirit and true scope of the invention asclaimed below.

What is claimed is:
 1. A data processing system comprising: A. a memoryhaving a plurality of addressable memory locations containinginstructions and operands; and B. a data processing device coupled tothe memory, the data processing device including: i. an arithmetic logicunit arranged to obtain a result from an operation on operands appliedto said arithmetic logic unit; ii. a register file coupled to thearithmetic logic unit and receiving the result of the operationperformed in the arithmetic and logic unit; iii. an address registerfile; iv. an instruction register coupled to the memory and operative tohold a program instruction; and v. an instruction unit coupled to theregister file, the address register file and the arithmetic logic unit,the instruction unit including circuits producing control signals tocontrol the operations of the data processing device in response todecoding a program instruction contained in the instruction register,the instruction unit including operation circuits responsive to anoperation field in an instruction, destination circuits responsive to adestination field in the instruction, first operand circuits responsiveto a first operand field in the instruction, and second operand circuitsresponsive to a second operand field in the instruction: a. theoperation circuits producing operation control signals to controloperation of the arithmetic logic unit; b. the destination circuitsproducing destination control signals to select a register in theregister file to contain a result; c. the first operand circuitsproducing first operand control signals selecting one of: the contentsof a register in the register file, and the contents of a first memorylocation addressed by a first displacement value combined with anaddress in a first register in the address register file; and d. thesecond operand circuits producing second operand control signalsselecting one of: immediate data contained in the second operand field,and the contents of a second memory location addressed by a seconddisplacement value to be combined with an address in a second registerin the address register file.
 2. The system of claim 1 including asemiconductor integrated circuit carrying the memory and the dataprocessing device.
 3. The system of claim 1 including a first auxiliaryarithmetic logic unit coupled to the instruction unit, the addressregister file and the memory, the first auxiliary arithmetic logic unitreceiving the first operand control signals to combine the firstdisplacement value with the address in the first register in the addressregister file to produce the address of the first memory location, and asecond auxiliary arithmetic logic unit coupled to the instruction unit,the address register file and the memory, the second auxiliaryarithmetic logic unit receiving the second operand control signals tocombine the second displacement value with the address in the secondregister in the address register file to produce the address of thesecond memory location.
 4. The system of claim 3 including asemiconductor integrated circuit carrying the memory and the dataprocessing device.
 5. The system of claim 3 including a first set ofaddress leads between the first auxiliary arithmetic logic unit and thememory, and a second set of address leads between the second auxiliaryarithmetic logic unit and the memory, the second set of address leadsbeing separate from the first set of address leads.
 6. The system ofclaim 1 in which the instruction unit circuits producing control signalsto control the operations of the data processing device in response todecoding a program instruction of 32 bits.
 7. A data processing systemcomprising: A. a memory having a plurality of addressable memorylocations containing instructions and operands; and B. a data processingdevice coupled to the memory, the data processing device including: i.an arithmetic logic unit arranged to obtain a result from an operationon operands applied to said arithmetic logic unit; ii. a register filecoupled to the arithmetic logic unit and receiving the result of theoperation performed in the arithmetic and logic unit; iii. an addressregister file; iv. an instruction register coupled to the memory andoperative to hold a program instruction; and v. an instruction unitcoupled to the register file, the address register file and thearithmetic logic unit, the instruction unit including circuits producingcontrol signals to control the operations of the data processing devicein response to decoding a program instruction contained in theinstruction register, the instruction unit including operation circuitsresponsive to an operation field in an instruction, destination circuitsresponsive to a destination field in the instruction, first operandcircuits responsive to a first operand field in the instruction, andsecond operand circuits responsive to a second operand field in theinstruction, the first operand field being separate from the secondoperand field: a. the operation circuits producing operation controlsignals to control operation of the arithmetic logic unit; b. thedestination circuits producing destination control signals to select aregister in the register file to contain a result; c. the first andsecond operand circuits producing respective first and second operandcontrol signals selecting one of: (i.) the contents of a register in theregister file and immediate data contained in an operand field; (ii.)the contents of a register in the register file and the contents of amemory location addressed by a displacement value combined with anaddress in a register in the address register file; (iii.) the contentsof a memory location addressed by a in the address register file andimmediate data contained in an displacement value to be combined with anaddress in a register operand field; and (iv.) the contents of onememory location addressed by one displacement value to be combined withan address in one register in the address register file and the contentsof another memory location addressed by another displacement value to becombined with an address in another register in the address registerfile.
 8. The system of claim 7 including a semiconductor integratedcircuit carrying the memory and the data processing device.
 9. Thesystem of claim 7 in which the instruction unit circuits producingcontrol signals to control the operations of the data processing devicein response to decoding a program instruction of 32 bits.
 10. A dataprocessing system comprising: A. a memory having a plurality ofaddressable memory locations containing instructions and operands; andB. a data processing device coupled to the memory, the data processingdevice including: i. an arithmetic logic unit arranged to obtain aresult from an operation on operands applied to said arithmetic logicunit; ii. a register file coupled to the arithmetic logic unit andreceiving the result of the operation performed in the arithmetic andlogic unit; iii. an address register file; iv. an instruction registercoupled to the memory and operative to hold a program instruction; andv. an instruction unit coupled to the register file, the addressregister file and the arithmetic logic unit, the instruction unitincluding means producing control signals to control the operations ofthe data processing device in response to decoding a program instructioncontained in the instruction register, the instruction unit includingoperation means responsive to an operation field in an instruction,destination means responsive to a destination field in the instruction,first operand means responsive to a first operand field in theinstruction, and second operand means responsive to a second operandfield in the instruction: a. the operation means producing operationcontrol signals to control operation of the arithmetic logic unit; b.the destination means producing destination control signals to select aregister in the register file to contain a result; c. the first operandmeans producing first operand control signals selecting one of: thecontents of a register in the register file, and the contents of a firstmemory location addressed by a first displacement value combined with anaddress in a first register in the address register file; and d. thesecond operand means producing second operand control signals selectingone of: immediate data contained in the second operand field, and thecontents of a second memory location addressed by a second displacementvalue to be combined with an address in a second register in the addressregister file.
 11. The system of claim 10 including a semiconductorintegrated circuit carrying the memory and the data processing device.12. The system of claim 10 in which the instruction unit means producingcontrol signals to control the operations of the data processing devicein response to decoding a program instruction of 32 bits.